mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
enhance TestRunCountRange
confirm that the number of runs comes out as expected, and add a couple of numbers out of order to verify that the 17-18-19 set gets coalesced into one run even if we add 17 and 19 before 18.
This commit is contained in:
parent
d4364bea52
commit
9b552ab508
1 changed files with 6 additions and 1 deletions
|
|
@ -165,8 +165,8 @@ func TestRunCountRange(t *testing.T) {
|
|||
}
|
||||
|
||||
c.add(17)
|
||||
c.add(18)
|
||||
c.add(19)
|
||||
c.add(18)
|
||||
|
||||
cnt = c.runCountRange(1, 22)
|
||||
if cnt != 10 {
|
||||
|
|
@ -180,6 +180,11 @@ func TestRunCountRange(t *testing.T) {
|
|||
if cnt != 9 {
|
||||
t.Fatalf("should get 9 from multiple ranges overlapping both sides, but got: %v", cnt)
|
||||
}
|
||||
// verify that the disparate ops resulted in three separate runs
|
||||
cnt = c.countRuns()
|
||||
if cnt != 3 {
|
||||
t.Fatalf("should get 3 total runs, but got: %v [%v]", cnt, c.runs)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunContains(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue