MCPcopy
hub / github.com/pquerna/ffjson / tsliceString

Function tsliceString

fflib/v1/reader_test.go:24–35  ·  view source on GitHub ↗
(t *testing.T, expected string, enc string)

Source from the content-addressed store, hash-verified

22)
23
24func tsliceString(t *testing.T, expected string, enc string) {
25 var out Buffer
26 ffr := newffReader([]byte(enc + `"`))
27 err := ffr.SliceString(&out)
28 if err != nil {
29 t.Fatalf("unexpect SliceString error: %v from %v", err, enc)
30 }
31
32 if out.String() != expected {
33 t.Fatalf(`failed to decode %v into %v, got: %v`, enc, expected, out.String())
34 }
35}
36
37func TestUnicode(t *testing.T) {
38 var testvecs = map[string]string{

Callers 1

TestUnicodeFunction · 0.85

Calls 4

StringMethod · 0.95
newffReaderFunction · 0.85
SliceStringMethod · 0.80
FatalfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…