Skip to content

Commit 746ea5b

Browse files
committed
adding regression test
1 parent c79bea7 commit 746ea5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fastfilter/src/test/java/org/fastfilter/RegressionTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,12 @@ public void regressionTest() {
7979
assertTrue(filter.mayContain(key));
8080
}
8181
}
82+
83+
@Test
84+
public void issue40() {
85+
long hash = 4282432426L;
86+
long n = 2400000016L; // important: exceeds 2147483647
87+
long r = (long)(Hash.reduce((int)hash, (int)n) & 0xffffffffL);
88+
assertTrue(r < n);
89+
}
8290
}

0 commit comments

Comments
 (0)