(t *testing.T)
| 24 | ) |
| 25 | |
| 26 | func TestPrimitiveMapReaderRejectsInvalidChunkSize(t *testing.T) { |
| 27 | f := NewFory(WithXlang(false), WithCompatible(false)) |
| 28 | buf := NewByteBuffer(nil) |
| 29 | buf.WriteLength(1) |
| 30 | buf.WriteUint8(KEY_DECL_TYPE | VALUE_DECL_TYPE) |
| 31 | buf.WriteUint8(2) |
| 32 | |
| 33 | f.readCtx.SetData(buf.Bytes()) |
| 34 | _ = f.readCtx.ReadStringStringMap(RefModeNone, false) |
| 35 | require.Error(t, f.readCtx.CheckError()) |
| 36 | } |
| 37 | |
| 38 | func TestPrimitiveMapReaderRejectsUnexpectedTypeInfo(t *testing.T) { |
| 39 | f := NewFory(WithXlang(false), WithCompatible(false)) |
nothing calls this directly
no test coverage detected