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

Function checkContent

container_test.go:18–53  ·  view source on GitHub ↗
(c container, s []uint16)

Source from the content-addressed store, hash-verified

16}
17
18func checkContent(c container, s []uint16) bool {
19 si := c.getShortIterator()
20 ctr := 0
21 fail := false
22 for si.hasNext() {
23 if ctr == len(s) {
24 log.Println("HERE")
25 fail = true
26 break
27 }
28 i := si.next()
29 if i != s[ctr] {
30
31 log.Println("THERE", i, s[ctr])
32 fail = true
33 break
34 }
35 ctr++
36 }
37 if ctr != len(s) {
38 log.Println("LAST")
39 fail = true
40 }
41 if fail {
42 log.Println("fail, found ")
43 si = c.getShortIterator()
44 z := 0
45 for si.hasNext() {
46 si.next()
47 z++
48 }
49 log.Println(z, len(s))
50 }
51
52 return !fail
53}
54
55func testContainerIteratorPeekNext(t *testing.T, c container) {
56 testSize := 5000

Callers 1

TestRoaringContainerFunction · 0.85

Calls 3

getShortIteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…