- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for HashTestUtils (0.07 sec)
-
guava-tests/test/com/google/common/hash/HashTestUtils.java
import java.util.Set; import org.junit.Assert; /** * Various utilities for testing {@link HashFunction}s. * * @author Dimitris Andreou * @author Kurt Alfred Kluever */ final class HashTestUtils { private HashTestUtils() {} /** Converts a string, which should contain only ascii-representable characters, to a byte[]. */ static byte[] ascii(String string) { byte[] bytes = new byte[string.length()];
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 25.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingTest.java
HashTestUtils.checkNoFunnels(Hashing.sha256()); HashTestUtils.assertInvariants(Hashing.sha256()); assertEquals("Hashing.sha256()", Hashing.sha256().toString()); } public void testSha384() { HashTestUtils.checkAvalanche(Hashing.sha384(), 100, 0.4); HashTestUtils.checkNo2BitCharacteristics(Hashing.sha384()); HashTestUtils.checkNoFunnels(Hashing.sha384());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java
assertPutString( new char[] { HashTestUtils.randomLowSurrogate(new Random()), HashTestUtils.randomHighSurrogate(new Random()) }); } public void testPutStringWithHighLowSurrogate() { assertPutString( new char[] { HashTestUtils.randomHighSurrogate(new Random()), HashTestUtils.randomLowSurrogate(new Random()) }); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
} }; // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32) // https://github.com/aappleby/smhasher/blob/master/src/main.cpp HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3); } public void testInvariants() { HashTestUtils.assertInvariants(murmur3_32()); } @SuppressWarnings("deprecation") public void testInvalidUnicodeHashString() { String str =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/ChecksumHashFunctionTest.java
assertHash32(0x5BD90FD9, ADLER_32, "The quick brown fox jumps over the lazy cog"); } private static void assertChecksum(ImmutableSupplier<Checksum> supplier, String input) { byte[] bytes = HashTestUtils.ascii(input); Checksum checksum = supplier.get(); checksum.update(bytes, 0, bytes.length); long value = checksum.getValue(); String toString = "name";
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 30 14:33:12 UTC 2018 - 3.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java
.build(); public void testHashing() { for (String stringToTest : INPUTS) { for (String algorithmToTest : ALGORITHMS.keySet()) { assertMessageDigestHashing(HashTestUtils.ascii(stringToTest), algorithmToTest); } } } public void testPutAfterHash() { Hasher sha1 = Hashing.sha1().newHasher(); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java
.build(); public void testHashing() { for (String stringToTest : INPUTS) { for (String algorithmToTest : ALGORITHMS.keySet()) { assertMessageDigestHashing(HashTestUtils.ascii(stringToTest), algorithmToTest); } } } public void testPutAfterHash() { Hasher sha1 = Hashing.sha1().newHasher(); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
public void testBasic() { for (double fpr = 0.0000001; fpr < 0.1; fpr *= 10) { for (int expectedInsertions = 1; expectedInsertions <= 10000; expectedInsertions *= 10) { checkSanity(BloomFilter.create(HashTestUtils.BAD_FUNNEL, expectedInsertions, fpr)); } } } public void testPreconditions() { assertThrows( IllegalArgumentException.class,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import static java.nio.charset.StandardCharsets.UTF_16LE; import static org.junit.Assert.assertThrows; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.hash.HashTestUtils.RandomHasherAction; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Arrays; import java.util.Collections; import java.util.List;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import static java.nio.charset.StandardCharsets.UTF_16LE; import static org.junit.Assert.assertThrows; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.hash.HashTestUtils.RandomHasherAction; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Arrays; import java.util.Collections; import java.util.List;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0)