This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git

commit 4c5b1b745dad5176b27ab3f305553a19db535fa0
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Mon Dec 30 22:17:22 2019 +0000

    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.
---
 src/test/java/org/apache/commons/codec/digest/XXHash32Test.java | 2 ++
 src/test/resources/small.bin                                    | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java 
b/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
index 07c5ce7..c3a5fbf 100644
--- a/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
@@ -61,8 +61,10 @@ public class XXHash32Test {
     public static Collection<Object[]> factory() {
         return Arrays.asList(new Object[][] {
             // reference checksums created with xxh32sum
+            // http://cyan4973.github.io/xxHash/
             { "bla.tar", "fbb5c8d1" },
             { "bla.tar.xz", "4106a208" },
+            { "small.bin", "f66c26f8" },
         });
     }
 
diff --git a/src/test/resources/small.bin b/src/test/resources/small.bin
new file mode 100644
index 0000000..56dda0f
--- /dev/null
+++ b/src/test/resources/small.bin
@@ -0,0 +1 @@
+��4e�cǗJ�
\ No newline at end of file

Reply via email to