Skip to content

Commit 4c5b1b7

Browse files
committed
Add reference file for XXHash32 using a small number of bytes.
This hits the edge cases for completing the hash with leftover bytes and no processing in the main update method.
1 parent 08bfd44 commit 4c5b1b7

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/test/java/org/apache/commons/codec/digest/XXHash32Test.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ public XXHash32Test(final String path, final String c) throws IOException {
6161
public static Collection<Object[]> factory() {
6262
return Arrays.asList(new Object[][] {
6363
// reference checksums created with xxh32sum
64+
// http://cyan4973.github.io/xxHash/
6465
{ "bla.tar", "fbb5c8d1" },
6566
{ "bla.tar.xz", "4106a208" },
67+
{ "small.bin", "f66c26f8" },
6668
});
6769
}
6870

src/test/resources/small.bin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
��4e�cǗJ�

0 commit comments

Comments
 (0)