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

Function TestIterate

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

Source from the content-addressed store, hash-verified

3187}
3188
3189func TestIterate(t *testing.T) {
3190 rb := NewBitmap()
3191
3192 for i := 0; i < 300; i++ {
3193 rb.Add(uint32(i))
3194 }
3195
3196 var values []uint32
3197 rb.Iterate(func(x uint32) bool {
3198 values = append(values, x)
3199 return true
3200 })
3201
3202 assert.Equal(t, rb.ToArray(), values)
3203}
3204
3205func TestIterateCompressed(t *testing.T) {
3206 rb := NewBitmap()

Callers

nothing calls this directly

Calls 4

AddMethod · 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…