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

Function TestDecoderObjectPoolError

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

Source from the content-addressed store, hash-verified

1744}
1745
1746func TestDecoderObjectPoolError(t *testing.T) {
1747 result := jsonDecodePartial{}
1748 dec := NewDecoder(nil)
1749 dec.Release()
1750 defer func() {
1751 err := recover()
1752 assert.NotNil(t, err, "err shouldnt be nil")
1753 assert.IsType(t, InvalidUsagePooledDecoderError(""), err, "err should be of type InvalidUsagePooledDecoderError")
1754 }()
1755 _ = dec.DecodeObject(&result)
1756 assert.True(t, false, "should not be called as decoder should have panicked")
1757}
1758
1759func TestNextKey(t *testing.T) {
1760 testCases := []struct {

Callers

nothing calls this directly

Calls 4

ReleaseMethod · 0.95
DecodeObjectMethod · 0.95
NewDecoderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…