mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
extended bitmap contains test coverage
This commit is contained in:
parent
3424211992
commit
188a4aa8d9
1 changed files with 14 additions and 0 deletions
|
|
@ -651,6 +651,7 @@ func testBM() *roaring.Bitmap {
|
|||
for i := uint64(0); i < 65535; i += 1 {
|
||||
bm.Add((4 << 16) + i)
|
||||
}
|
||||
bm.Optimize()
|
||||
//count 75007
|
||||
return bm
|
||||
}
|
||||
|
|
@ -668,6 +669,19 @@ func TestBitmapOffsetRange(t *testing.T) {
|
|||
}
|
||||
|
||||
}
|
||||
func TestBitmapContains(t *testing.T) {
|
||||
bm := testBM()
|
||||
|
||||
//search for run value present
|
||||
if found := bm.Contains(3 << 16); !found {
|
||||
t.Fatalf("Test #1 Not Found %d ", 3<<16)
|
||||
}
|
||||
|
||||
//search for value not present
|
||||
if found := bm.Contains((3 << 16) + 2048); found {
|
||||
t.Fatalf("Test #2 Found %d ", (3<<16)+2048)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBitmapBufIterator(t *testing.T) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue