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

Function TestReverseIteratorCount

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

Source from the content-addressed store, hash-verified

572}
573
574func TestReverseIteratorCount(t *testing.T) {
575 array := []int{2, 63, 64, 65, 4095, 4096, 4097, 4159, 4160, 4161, 5000, 20000, 66666}
576 for _, testSize := range array {
577 b := New()
578 for i := uint32(0); i < uint32(testSize); i++ {
579 b.Add(i)
580 }
581 it := b.ReverseIterator()
582 count := 0
583 for it.HasNext() {
584 it.Next()
585 count++
586 }
587
588 assert.Equal(t, testSize, count)
589 }
590}
591
592func TestRoaringIntervalCheck(t *testing.T) {
593 r := BitmapOf(1, 2, 3, 1000)

Callers

nothing calls this directly

Calls 5

NewFunction · 0.70
HasNextMethod · 0.65
NextMethod · 0.65
AddMethod · 0.45
ReverseIteratorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…