github.com/webx-top/com@v1.2.12/formatter/stringer_test.go (about)

     1  package formatter
     2  
     3  import "testing"
     4  
     5  func TestStringer(t *testing.T) {
     6  	st := AsStringer(map[string]interface{}{
     7  		`A`: 100,
     8  		`B`: true,
     9  	})
    10  	t.Logf(`JSONEncoder: %s`, st)
    11  
    12  	st = AsStringer(map[string]interface{}{
    13  		`A`: 100,
    14  		`B`: true,
    15  	}, PrettyEncoder)
    16  	t.Logf(`PrettyEncoder: %s`, st)
    17  }