(t *testing.T)
| 527 | } |
| 528 | |
| 529 | func TestReadBufferObjectCopiesInBandDataFromStream(t *testing.T) { |
| 530 | data := []byte{1, 3, 10, 11, 12, 20, 21, 22, 23, 24, 25} |
| 531 | ctx := NewReadContext(false) |
| 532 | ctx.buffer.ResetWithReader(bytes.NewReader(data), 2) |
| 533 | |
| 534 | buf := ctx.ReadBufferObject() |
| 535 | require.NoError(t, ctx.CheckError()) |
| 536 | require.Equal(t, []byte{10, 11, 12}, buf.GetData()) |
| 537 | |
| 538 | ctx.buffer.Skip(6, ctx.Err()) |
| 539 | require.NoError(t, ctx.CheckError()) |
| 540 | require.Equal(t, []byte{10, 11, 12}, buf.GetData()) |
| 541 | } |
| 542 | |
| 543 | // TestSerializeZeroCopy is temporarily disabled during API refactoring |
| 544 | // TODO: Re-enable when zero-copy serialization API is updated |
nothing calls this directly
no test coverage detected