MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / TestBitmapcontainerAndCardinality

Function TestBitmapcontainerAndCardinality

bitmapcontainer_test.go:52–59  ·  view source on GitHub ↗

bitmap containers get cardinality in range, miss the last index, issue #183

(t *testing.T)

Source from the content-addressed store, hash-verified

50
51// bitmap containers get cardinality in range, miss the last index, issue #183
52func TestBitmapcontainerAndCardinality(t *testing.T) {
53 for r := 0; r <= 65535; r++ {
54 c1 := newRunContainer16Range(0, uint16(r))
55 c2 := newBitmapContainerwithRange(0, r)
56
57 assert.Equal(t, r+1, c1.andCardinality(c2))
58 }
59}
60
61func TestIssue181(t *testing.T) {
62 t.Run("Initial issue 181", func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

newRunContainer16RangeFunction · 0.85
andCardinalityMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…