Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for HashTestUtils (0.31 sec)

  1. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 25.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/Murmur3Hash128Test.java

              }
            };
        // Murmur3F, MurmurHash3 for x64, 128-bit (MurmurHash3_x64_128)
        // From http://code.google.com/p/smhasher/source/browse/trunk/main.cpp
        HashTestUtils.verifyHashFunction(hf, 128, 0x6384BA69);
      }
    
      public void testInvariants() {
        HashTestUtils.assertInvariants(murmur3_128());
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.2K bytes
    - Viewed (0)
  3. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 08 13:56:22 UTC 2021
    - 8.6K bytes
    - Viewed (0)
  4. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  5. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 15:27:58 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

    import static com.google.common.base.Charsets.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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

    import static com.google.common.base.Charsets.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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

            String algorithm = cell.getRowKey();
            SecretKey key = cell.getColumnKey();
            HashFunction hashFunc = cell.getValue();
            assertMacHashing(HashTestUtils.ascii(stringToTest), algorithm, key, hashFunc);
          }
        }
      }
    
      @AndroidIncompatible // sun.security
      public void testNoProviders() {
        ProviderList providers = Providers.getProviderList();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

            String algorithm = cell.getRowKey();
            SecretKey key = cell.getColumnKey();
            HashFunction hashFunc = cell.getValue();
            assertMacHashing(HashTestUtils.ascii(stringToTest), algorithm, key, hashFunc);
          }
        }
      }
    
      @AndroidIncompatible // sun.security
      public void testNoProviders() {
        ProviderList providers = Providers.getProviderList();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.8K bytes
    - Viewed (0)
Back to top