(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestAppendStringer(t *testing.T) { |
| 28 | oldJSONMarshalFunc := JSONMarshalFunc |
| 29 | defer func() { |
| 30 | JSONMarshalFunc = oldJSONMarshalFunc |
| 31 | }() |
| 32 | |
| 33 | JSONMarshalFunc = func(v interface{}) ([]byte, error) { |
| 34 | return internal.InterfaceMarshalFunc(v) |
| 35 | } |
| 36 | |
| 37 | for _, tt := range internal.EncodeStringerTests { |
| 38 | b := enc.AppendStringer([]byte{}, tt.In) |
| 39 | if got, want := string(b), tt.Out; got != want { |
| 40 | t.Errorf("AppendStringer(%q)\ngot: %#q, want: %#q", tt.In, got, want) |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | func TestAppendStringers(t *testing.T) { |
| 46 | for _, tt := range internal.EncodeStringersTests { |
nothing calls this directly
no test coverage detected