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

Function TestManyIterator

manyiterator_test.go:9–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestManyIterator(t *testing.T) {
10 type searchTest struct {
11 name string
12 iterator shortIterator
13 high uint64
14 buf []uint64
15 expectedValue int
16 }
17
18 tests := []searchTest{
19 {
20 "no values",
21 shortIterator{},
22 uint64(1024),
23 []uint64{},
24 0,
25 },
26 {
27 "1 value ",
28 shortIterator{[]uint16{uint16(1)}, 0},
29 uint64(1024),
30 make([]uint64, 1),
31 1,
32 },
33 }
34
35 for _, testCase := range tests {
36 t.Run(testCase.name, func(t *testing.T) {
37 iterator := testCase.iterator
38 result := iterator.nextMany64(testCase.high, testCase.buf)
39 assert.Equal(t, testCase.expectedValue, result)
40 })
41 }
42}

Callers

nothing calls this directly

Calls 1

nextMany64Method · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…