MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / TestIterateCompressed

Function TestIterateCompressed

roaring_test.go:3205–3221  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3203}
3204
3205func TestIterateCompressed(t *testing.T) {
3206 rb := NewBitmap()
3207
3208 for i := 0; i < 300; i++ {
3209 rb.Add(uint32(i))
3210 }
3211
3212 rb.RunOptimize()
3213
3214 var values []uint32
3215 rb.Iterate(func(x uint32) bool {
3216 values = append(values, x)
3217 return true
3218 })
3219
3220 assert.Equal(t, rb.ToArray(), values)
3221}
3222
3223func TestIterateLargeValues(t *testing.T) {
3224 rb := NewBitmap()

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
RunOptimizeMethod · 0.95
IterateMethod · 0.95
ToArrayMethod · 0.95
NewBitmapFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…