Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new rangeOnfOnes implementation induces multiple test suite failures #75

Closed
glycerine opened this issue Dec 10, 2016 · 3 comments
Closed

Comments

@glycerine
Copy link
Member

glycerine commented Dec 10, 2016

when roaringarray.go's func rangeOfOnes(start, last int) container is changed to be implemented purely with bitmaps, arrays, or rle16 containers, I see test suite failure. Here are the 3 options:

For context: this

https://github.com/RoaringBitmap/roaring/blob/master/roaringarray.go#L42

is being replaced by:

 func rangeOfOnes(start, last int) container {
       return newBitmapContainerwithRange(start, last) // option 1
       //return newArrayContainerRange(start, last) // option 2
       //return newRunContainer16Range(uint64(start), uint64(last)) // option3
 }

as in glycerine#1

and here are the suite fails, which are different in each case:

bitmaps for runs, test failures:

func TestDoubleAndNotBug01(t *testing.T)  fails, line 1681

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 1681:
  Expected: true
  Actual:   false

----------

arrays for runs: 2 distinct fails:

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 1616:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)


--- FAIL: TestDoubleAdd2 (0.01s)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 1629:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)



--- FAIL: TestDoubleAdd3 (0.01s)

----------
with rle16:


Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 787:
  Expected: '96617'
  Actual:   '9'
  (Should be equal)



Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 865:
  Expected: '35392'
  Actual:   '1928'
  (Should be equal)

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 886:
  Expected: '131999'
  Actual:   '131351'
  (Should be equal)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 933:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 1589:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)


--- FAIL: TestFlipBigA (0.12s)
@glycerine
Copy link
Member Author

okay, it was no big deal. The equals() methods weren't checking for container types other than their own. fixed at 9bf6b3e (tip of glycerine/rle branch)

@glycerine
Copy link
Member Author

glycerine commented Dec 11, 2016

mmm.... too hasty in closing; there are still some test failures with runContainer16 in place for rangeOfOnes:

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 787:
  Expected: '96617'
  Actual:   '9'
  (Should be equal)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 865:
  Expected: '35392'
  Actual:   '1928'
  (Should be equal)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 886:
  Expected: '131999'
  Actual:   '131351'
  (Should be equal)


Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 933:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)


--- FAIL: TestBitmap (12.96s)

Failures:

  * /Users/jaten/go/src/github.com/glycerine/roaring/roaring_test.go 
  Line 1589:
  Expected: 'true'
  Actual:   'false'
  (Should be equal)

--- FAIL: TestFlipBigA (0.12s)

@glycerine glycerine reopened this Dec 11, 2016
@glycerine
Copy link
Member Author

The Not(range) algorithm was incorrect and untested.
Both these problems are fixed in the latest push to glycerine/rle branch; eb38642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant