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

Function TestPrimitiveMapReaderRejectsNullChunks

go/fory/map_primitive_test.go:52–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestPrimitiveMapReaderRejectsNullChunks(t *testing.T) {
53 f := NewFory(WithXlang(false), WithCompatible(false))
54 buf := NewByteBuffer(nil)
55 buf.WriteLength(1)
56 buf.WriteUint8(KEY_HAS_NULL)
57
58 f.readCtx.SetData(buf.Bytes())
59 _ = f.readCtx.ReadStringStringMap(RefModeNone, false)
60 require.Error(t, f.readCtx.CheckError())
61}

Callers

nothing calls this directly

Calls 11

WriteLengthMethod · 0.95
WriteUint8Method · 0.95
BytesMethod · 0.95
NewForyFunction · 0.85
WithXlangFunction · 0.85
WithCompatibleFunction · 0.85
NewByteBufferFunction · 0.85
SetDataMethod · 0.80
ReadStringStringMapMethod · 0.80
ErrorMethod · 0.45
CheckErrorMethod · 0.45

Tested by

no test coverage detected