MCPcopy Create free account
hub / github.com/francoispqt/gojay / TestDecoderObjectDecoderInvalidJSONError

Function TestDecoderObjectDecoderInvalidJSONError

decode_object_test.go:1714–1720  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1712}
1713
1714func TestDecoderObjectDecoderInvalidJSONError(t *testing.T) {
1715 v := &TestObj{}
1716 dec := NewDecoder(strings.NewReader(`{"err:}`))
1717 err := dec.DecodeObject(v)
1718 assert.NotNil(t, err, "Err must not be nil as JSON is invalid")
1719 assert.IsType(t, InvalidJSONError(""), err, "err message must be 'Invalid JSON'")
1720}
1721
1722func TestDecoderObjectDecoderInvalidJSONError2(t *testing.T) {
1723 v := &TestSubObj{}

Callers

nothing calls this directly

Calls 3

DecodeObjectMethod · 0.95
NewDecoderFunction · 0.85
InvalidJSONErrorTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…