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

Function testContainerIteratorPeekNext

container_test.go:55–70  ·  view source on GitHub ↗
(t *testing.T, c container)

Source from the content-addressed store, hash-verified

53}
54
55func testContainerIteratorPeekNext(t *testing.T, c container) {
56 testSize := 5000
57 for i := 0; i < testSize; i++ {
58 c.iadd(uint16(i))
59 }
60
61 i := c.getShortIterator()
62 assert.True(t, i.hasNext())
63
64 for i.hasNext() {
65 assert.Equal(t, i.peekNext(), i.next())
66 testSize--
67 }
68
69 assert.Equal(t, 0, testSize)
70}
71
72func testContainerIteratorAdvance(t *testing.T, con container) {
73 values := []uint16{1, 2, 15, 16, 31, 32, 33, 9999}

Callers 3

Calls 5

iaddMethod · 0.65
getShortIteratorMethod · 0.65
hasNextMethod · 0.65
peekNextMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…