Skip to content

Commit

Permalink
adding regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 2, 2023
1 parent c79bea7 commit 746ea5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fastfilter/src/test/java/org/fastfilter/RegressionTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ public void regressionTest() {
assertTrue(filter.mayContain(key));
}
}

@Test
public void issue40() {
long hash = 4282432426L;
long n = 2400000016L; // important: exceeds 2147483647
long r = (long)(Hash.reduce((int)hash, (int)n) & 0xffffffffL);
assertTrue(r < n);
}
}

0 comments on commit 746ea5b

Please sign in to comment.