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

Function TestPrimitiveListReadableOverflow

go/fory/slice_primitive_test.go:30–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28)
29
30func TestPrimitiveListReadableOverflow(t *testing.T) {
31 var err Error
32 serializer := primitiveListSerializer{type_: reflect.TypeOf([]int64{}), elemTypeID: INT64}
33 length := int(^uint(0)>>1)/8 + 1
34 assert.False(t, serializer.checkBodyReadable(NewByteBuffer(nil), &err, length, false))
35 assert.True(t, err.HasError())
36}
37
38func TestFloat16Slice(t *testing.T) {
39 f := NewFory(WithXlang(false), WithCompatible(false))

Callers

nothing calls this directly

Calls 3

checkBodyReadableMethod · 0.95
HasErrorMethod · 0.95
NewByteBufferFunction · 0.85

Tested by

no test coverage detected