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

Function TestDecoderStringDecoderAPI

decode_string_test.go:653–660  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

651}
652
653func TestDecoderStringDecoderAPI(t *testing.T) {
654 var v string
655 dec := NewDecoder(strings.NewReader(`"hello world!"`))
656 defer dec.Release()
657 err := dec.DecodeString(&v)
658 assert.Nil(t, err, "Err must be nil")
659 assert.Equal(t, "hello world!", v, "v must be equal to 'hello world!'")
660}
661
662func TestDecoderStringPoolError(t *testing.T) {
663 // reset the pool to make sure it's not full

Callers

nothing calls this directly

Calls 3

ReleaseMethod · 0.95
DecodeStringMethod · 0.95
NewDecoderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…