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

Function TestDecoderSliceDecoderAPIError

decode_array_test.go:515–521  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

513}
514
515func TestDecoderSliceDecoderAPIError(t *testing.T) {
516 testArr := testSliceInts{}
517 dec := NewDecoder(strings.NewReader(`hello`))
518 err := dec.DecodeArray(&testArr)
519 assert.NotNil(t, err, "Err must not be nil as JSON is invalid")
520 assert.IsType(t, InvalidJSONError(""), err, "err message must be 'Invalid JSON'")
521}
522
523func TestUnmarshalJSONArrays(t *testing.T) {
524 testCases := []struct {

Callers

nothing calls this directly

Calls 3

DecodeArrayMethod · 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…