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

Function TestReadHeaderRejectsOutOfBandWithoutBuffers

go/fory/struct_test.go:623–632  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

621}
622
623func TestReadHeaderRejectsOutOfBandWithoutBuffers(t *testing.T) {
624 f := New(WithXlang(true), WithCompatible(false))
625 f.readCtx.SetData([]byte{XLangFlag | OutOfBandFlag})
626
627 readHeader(f.readCtx)
628
629 err := f.readCtx.TakeError()
630 require.Error(t, err)
631 require.Contains(t, err.Error(), "out-of-band buffers")
632}
633
634func TestFloat16StructField(t *testing.T) {
635 type StructWithFloat16 struct {

Callers

nothing calls this directly

Calls 8

WithXlangFunction · 0.85
WithCompatibleFunction · 0.85
readHeaderFunction · 0.85
SetDataMethod · 0.80
NewFunction · 0.70
TakeErrorMethod · 0.45
ErrorMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected