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

Function TestDecodeInterfacePoolError

decode_interface_test.go:511–522  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

509}
510
511func TestDecodeInterfacePoolError(t *testing.T) {
512 result := interface{}(1)
513 dec := NewDecoder(nil)
514 dec.Release()
515 defer func() {
516 err := recover()
517 assert.NotNil(t, err, "err shouldnt be nil")
518 assert.IsType(t, InvalidUsagePooledDecoderError(""), err, "err should be of type InvalidUsagePooledDecoderError")
519 }()
520 _ = dec.DecodeInterface(&result)
521 assert.True(t, false, "should not be called as decoder should have panicked")
522}
523
524func TestDecodeNull(t *testing.T) {
525 var i interface{}

Callers

nothing calls this directly

Calls 4

ReleaseMethod · 0.95
DecodeInterfaceMethod · 0.95
NewDecoderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…