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

Function TestBitmapNextSet

bitmapcontainer_test.go:165–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

163}
164
165func TestBitmapNextSet(t *testing.T) {
166 testSize := 5000
167 bc := newBitmapContainer()
168
169 for i := 0; i < testSize; i++ {
170 bc.iadd(uint16(i))
171 }
172
173 m := 0
174
175 for n := 0; m < testSize; n, m = bc.NextSetBit(uint(n)+1), m+1 {
176 assert.Equal(t, m, n)
177 }
178
179 assert.Equal(t, 5000, m)
180}
181
182func TestBitmapPrevSet(t *testing.T) {
183 testSize := 5000

Callers

nothing calls this directly

Calls 3

newBitmapContainerFunction · 0.85
NextSetBitMethod · 0.80
iaddMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…