MCPcopy Create free account
hub / github.com/WICG/webpackage / TestDecodeByteStringNotCrashing

Function TestDecodeByteStringNotCrashing

go/internal/cbor/decoder_test.go:52–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestDecodeByteStringNotCrashing(t *testing.T) {
53 var in = []byte{0x5b, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
54 e := NewDecoder(bytes.NewReader(in))
55 _, err := e.DecodeByteString()
56 if err == nil {
57 t.Error("got success, want error")
58 }
59}

Callers

nothing calls this directly

Calls 2

DecodeByteStringMethod · 0.95
NewDecoderFunction · 0.85

Tested by

no test coverage detected