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

Function TestGobcoding043

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

Source from the content-addressed store, hash-verified

289}
290
291func TestGobcoding043(t *testing.T) {
292 rb := BitmapOf(1, 2, 3, 4, 5, 100, 1000)
293
294 buf := new(bytes.Buffer)
295 encoder := gob.NewEncoder(buf)
296 err := encoder.Encode(rb)
297
298 require.NoError(t, err)
299
300 var b Bitmap
301 decoder := gob.NewDecoder(buf)
302 err = decoder.Decode(&b)
303
304 require.NoError(t, err)
305 assert.True(t, b.Equals(rb))
306}
307
308func TestByteSliceAsUint16Slice(t *testing.T) {
309 t.Run("valid slice", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

EqualsMethod · 0.95
BitmapOfFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…