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

Function TestIterateLargeValues

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

Source from the content-addressed store, hash-verified

3221}
3222
3223func TestIterateLargeValues(t *testing.T) {
3224 rb := NewBitmap()
3225
3226 // This range of values ensures that all different types of containers will be used
3227 for i := 150000; i < 450000; i++ {
3228 rb.Add(uint32(i))
3229 }
3230
3231 var values []uint32
3232 rb.Iterate(func(x uint32) bool {
3233 values = append(values, x)
3234 return true
3235 })
3236
3237 assert.Equal(t, rb.ToArray(), values)
3238}
3239
3240func TestIterateHalt(t *testing.T) {
3241 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…