Browse Source

buzhash: One more test case

Test with more than 31 bytes to make sure our BARREL_SHIFT macro
works correctly.
Jonas Borgström 11 years ago
parent
commit
95162ce1f8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      attic/testsuite/chunker.py

+ 2 - 0
attic/testsuite/chunker.py

@@ -25,3 +25,5 @@ class ChunkerTestCase(AtticTestCase):
         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)