-
Notifications
You must be signed in to change notification settings - Fork 346
Make BFHash take on non negative values only, issue #229 #243
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
Conversation
… added scalacheck that the new indices are non negative and a test for the problematic case
should remove seed variable to align with PR #220 (in the tests) |
} | ||
|
||
val negativeBFHash = NegativeBFHash(NUM_HASHES, WIDTH, SEED) | ||
val bfHash = BFHash(NUM_HASHES, WIDTH, SEED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use scalacheck to generate these rather than being fixed magic values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, ALSO have fixed magic values. These were found to have the bug, so let's keep them to prevent regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well for the Specification section rather than the scalacheck one we should try generate the exact problem case, not sure it would make any benefit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a test for the problem case in the Specification already.
I'll make the property generic with an arbitrary "negative" hash.
Great to see a pull request on this, thanks! Just a few small things |
Make BFHash take on non negative values only, issue #229
No description provided.