MCPcopy
hub / github.com/RoaringBitmap/roaring / TestSerializationOfEmptyBitmap

Function TestSerializationOfEmptyBitmap

serialization_test.go:19–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17)
18
19func TestSerializationOfEmptyBitmap(t *testing.T) {
20 rb := NewBitmap()
21
22 buf := &bytes.Buffer{}
23 _, err := rb.WriteTo(buf)
24
25 require.NoError(t, err)
26 assert.EqualValues(t, buf.Len(), rb.GetSerializedSizeInBytes())
27
28 newrb := NewBitmap()
29 _, err = newrb.ReadFrom(buf)
30
31 require.NoError(t, err)
32 assert.True(t, rb.Equals(newrb))
33}
34
35func TestBase64_036(t *testing.T) {
36 rb := BitmapOf(1, 2, 3, 4, 5, 100, 1000)

Callers

nothing calls this directly

Calls 6

WriteToMethod · 0.95
ReadFromMethod · 0.95
EqualsMethod · 0.95
NewBitmapFunction · 0.70
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…