From 95162ce1f8317cbc48410812797ddaa212a58b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Thu, 5 Jun 2014 15:11:46 +0200 Subject: [PATCH] buzhash: One more test case Test with more than 31 bytes to make sure our BARREL_SHIFT macro works correctly. --- attic/testsuite/chunker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/attic/testsuite/chunker.py b/attic/testsuite/chunker.py index 62002626b..09e9d01f9 100644 --- a/attic/testsuite/chunker.py +++ b/attic/testsuite/chunker.py @@ -25,3 +25,5 @@ def test_buzhash(self): self.assert_equal(buzhash(b'abcdefghijklmnop', 0), 3795437769) self.assert_equal(buzhash(b'abcdefghijklmnop', 1), 3795400502) self.assert_equal(buzhash(b'abcdefghijklmnop', 1), buzhash_update(buzhash(b'Xabcdefghijklmno', 1), ord('X'), ord('p'), 16, 1)) + # Test with more than 31 bytes to make sure our barrel_shift macro works correctly + self.assert_equal(buzhash(b'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', 0), 566521248)