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

Function TestReadBoolSliceWrappedBuffer

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

Source from the content-addressed store, hash-verified

504}
505
506func TestReadBoolSliceWrappedBuffer(t *testing.T) {
507 arrayBytes := NewByteBuffer(nil)
508 WriteBoolSlice(arrayBytes, []bool{true, false})
509
510 err := &Error{}
511 result := ReadBoolSlice(NewByteBuffer(arrayBytes.Bytes()), err)
512
513 assert.False(t, err.HasError(), "Expected wrapped buffer reads to use serialized array bytes")
514 assert.Equal(t, []bool{true, false}, result)
515}

Callers

nothing calls this directly

Calls 6

BytesMethod · 0.95
HasErrorMethod · 0.95
NewByteBufferFunction · 0.85
WriteBoolSliceFunction · 0.85
ReadBoolSliceFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected