jmalkin commented on code in PR #567:
URL: https://github.com/apache/datasketches-java/pull/567#discussion_r1622810716
##########
src/test/java/org/apache/datasketches/filters/quotientfilter/QuotientFilterTest.java:
##########
@@ -158,30 +166,32 @@ static public void OverflowTest() {
* and the program exits, indicating a test failure.
*/
@Test
- static public void testQuotientFilterInsertionAndIteration() {
+ public void testQuotientFilterInsertionAndIteration() {
int bits_per_entry = 8;
int num_entries_power = 4;
//int num_entries = (int)Math.pow(2, num_entries_power);
//int fingerprint_size = bits_per_entry - 3;
QuotientFilter qf = new QuotientFilter(num_entries_power,
bits_per_entry);
- qf.insert(0, 2, false);
- qf.insert(0, 3, false);
- qf.insert(0, 3, false);
- qf.insert(0, 4, false);
- qf.insert(0, 15, false); // last slot in the filter
- qf.insert(0, 16, false); // outside the bounds
+ qf.insert(0x1F, 0, false);
+ qf.insert(0x1F, 2, false);
+ qf.insert(0x1F, 3, false);
+ qf.insert(0x1F, 3, false);
+ qf.insert(0x1F, 4, false);
+ qf.insert(0x1F, 15, false); // last slot in the filter
+ qf.insert(0x1F, 16, false); // outside the bounds
qf.pretty_print() ;
Iterator it = new Iterator(qf);
- int[] arr = new int[] {2, 3, 3, 4, 15};
+ //int[] arr = new int[] {2, 3, 3, 4, 15};
Review Comment:
Had modified the test during debugging but clearly didn't roll it all back.
Can remove the addition of item 0 but keeping the fingerprints as `0x1F` since
it was much easier to debug when actually setting something!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]