@Test public void testHash32ByteArrayIntInt() { for (int i = 0; i < input.length; i++) { final int hash = MurmurHash.hash32(input[i], input[i].length, 0x71b4954d); if (hash != results32_seed[i]) { fail( String.format( "Unexpected hash32 result for example %d: 0x%08x instead of 0x%08x", i, hash, results32_seed[i])); } } }
@Test public void testHash32StringIntInt() { final int hash = MurmurHash.hash32(text, 2, text.length() - 4); assertTrue(hash == 0x4d666d90); }
@Test public void testHash32String() { final int hash = MurmurHash.hash32(text); assertTrue(hash == 0xb3bf597e); }