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

Function TestDecodeStreamDecodePooledDecoderError1

decode_stream_pool_test.go:24–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestDecodeStreamDecodePooledDecoderError1(t *testing.T) {
25 // we override the pool chan
26 dec := Stream.NewDecoder(nil)
27 dec.Release()
28 defer func() {
29 err := recover()
30 assert.NotNil(t, err, "err shouldnt be nil")
31 assert.IsType(t, InvalidUsagePooledDecoderError(""), err, "err should be of type InvalidUsagePooledDecoderError")
32 }()
33 var v = testSliceStrings{}
34 dec.DecodeArray(&v)
35 // make sure they are the same
36 assert.True(t, false, "should not be called as decoder should have panicked")
37}
38
39func TestDecodeStreamDecodePooledDecoderError2(t *testing.T) {
40 // we override the pool chan

Callers

nothing calls this directly

Calls 4

ReleaseMethod · 0.95
DecodeArrayMethod · 0.95
NewDecoderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…