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

Function TestStringTag

tests/encode_test.go:76–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestStringTag(t *testing.T) {
77 var s StringTag
78 s.BoolStr = true
79 s.IntStr = 42
80 s.StrStr = "xzbit"
81 got, err := json.MarshalIndent(&s, "", " ")
82 if err != nil {
83 t.Fatal(err)
84 }
85 if got := string(got); got != stringTagExpected {
86 t.Fatalf(" got: %s\nwant: %s\n", got, stringTagExpected)
87 }
88}
89
90func TestUnsupportedValues(t *testing.T) {
91 for _, v := range unsupportedValues {

Callers

nothing calls this directly

Calls 1

FatalfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…