add container types and set c.n to get tests working

This commit is contained in:
Matthew Jaffee 2017-12-07 14:58:11 -06:00
parent 8fa965df37
commit 9d9eb98fa5
No known key found for this signature in database
GPG key ID: 51C676AF9FFCDB87

View file

@ -1267,8 +1267,8 @@ func TestBitmapZeroRange(t *testing.T) {
}
func TestUnionBitmapRun(t *testing.T) {
a := &container{bitmap: make([]uint64, bitmapN)}
b := &container{}
a := &container{container_type: ContainerBitmap, bitmap: make([]uint64, bitmapN)}
b := &container{container_type: ContainerRun}
tests := []struct {
bitmap []uint64
runs []interval16
@ -1288,6 +1288,7 @@ func TestUnionBitmapRun(t *testing.T) {
}
a.n = a.bitmapCountRange(0, 65535)
b.runs = test.runs
b.n = b.runCountRange(0, 65535)
ret := unionBitmapRun(a, b)
if ret.isArray() {
ret.arrayToBitmap()
@ -1556,8 +1557,8 @@ func TestDifferenceRunBitmap(t *testing.T) {
}
func TestDifferenceBitmapRun(t *testing.T) {
a := &container{bitmap: make([]uint64, bitmapN)}
b := &container{}
a := &container{container_type: ContainerBitmap, bitmap: make([]uint64, bitmapN)}
b := &container{container_type: ContainerRun}
tests := []struct {
bitmap []uint64
runs []interval16