MCPcopy Create free account
hub / github.com/apache/fory / TestReadVarUint32Small7StreamRejectsOverflowFifthByte

Function TestReadVarUint32Small7StreamRejectsOverflowFifthByte

go/fory/buffer_test.go:177–182  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func TestReadVarUint32Small7StreamRejectsOverflowFifthByte(t *testing.T) {
178 buf := NewByteBufferFromReader(bytes.NewReader([]byte{0x80, 0x80, 0x80, 0x80, 0x10}), 4)
179 var err Error
180 _ = buf.ReadVarUint32Small7(&err)
181 require.True(t, err.HasError())
182}

Callers

nothing calls this directly

Calls 3

HasErrorMethod · 0.95
NewByteBufferFromReaderFunction · 0.85
ReadVarUint32Small7Method · 0.80

Tested by

no test coverage detected