Home
last modified time | relevance | path

Searched refs:hashFunction (Results 1 – 17 of 17) sorted by relevance

/external/guava/guava-tests/test/com/google/common/hash/
DHashTestUtils.java58 static void verifyHashFunction(HashFn hashFunction, int hashbits, int expected) { in verifyHashFunction() argument
68 byte[] hash = hashFunction.hash(Arrays.copyOf(key, i), seed); in verifyHashFunction()
73 byte[] result = hashFunction.hash(hashes, 0); in verifyHashFunction()
414 static void assertInvariants(HashFunction hashFunction) { in assertInvariants() argument
419 HashCode hashcode1 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants()
420 HashCode hashcode2 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants()
422 Assert.assertEquals(hashFunction.bits(), hashcode1.bits()); in assertInvariants()
423 Assert.assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8); in assertInvariants()
428 assertHashBytesThrowsCorrectExceptions(hashFunction); in assertInvariants()
429 assertIndependentHashers(hashFunction); in assertInvariants()
[all …]
DHashingOutputStreamTest.java32 private HashFunction hashFunction; field in HashingOutputStreamTest
38 hashFunction = EasyMock.createMock(HashFunction.class); in setUp()
40 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once(); in setUp()
41 EasyMock.replay(hashFunction); in setUp()
48 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putSingleByte()
52 EasyMock.verify(hashFunction); in testWrite_putSingleByte()
60 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putByteArray()
64 EasyMock.verify(hashFunction); in testWrite_putByteArray()
72 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putByteArrayAtPos()
76 EasyMock.verify(hashFunction); in testWrite_putByteArrayAtPos()
DHashingInputStreamTest.java36 private HashFunction hashFunction; field in HashingInputStreamTest
43 hashFunction = EasyMock.createMock(HashFunction.class); in setUp()
46 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once(); in setUp()
47 EasyMock.replay(hashFunction); in setUp()
53 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putSingleByte()
58 EasyMock.verify(hashFunction); in testRead_putSingleByte()
66 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putByteArray()
75 EasyMock.verify(hashFunction); in testRead_putByteArray()
83 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putByteArrayAtPos()
92 EasyMock.verify(hashFunction); in testRead_putByteArrayAtPos()
[all …]
DHashFunctionEnum.java43 private final HashFunction hashFunction; field in HashFunctionEnum
45 private HashFunctionEnum(HashFunction hashFunction) { in HashFunctionEnum() argument
46 this.hashFunction = hashFunction; in HashFunctionEnum()
50 return hashFunction; in getHashFunction()
DHashingTest.java427 HashFunction hashFunction = (HashFunction) method.invoke(Hashing.class); in testAllHashFunctionsHaveKnownHashes() local
428 assertTrue("There should be at least 3 entries in KNOWN_HASHES for " + hashFunction, in testAllHashFunctionsHaveKnownHashes()
429 KNOWN_HASHES.row(hashFunction).size() >= 3); in testAllHashFunctionsHaveKnownHashes()
/external/caliper/caliper/src/main/java/com/google/caliper/model/
DHost.java54 initHash(builder.hashFunction); in Host()
72 private void initHash(HashFunction hashFunction) { in initHash() argument
74 this.hash = hashFunction.hashObject(this, HostFunnel.INSTANCE).asInt(); in initHash()
103 private HashFunction hashFunction = getPersistentHashFunction(); field in Host.Builder
119 @VisibleForTesting public Builder hashFunctionForTesting(HashFunction hashFunction) { in hashFunctionForTesting() argument
121 this.hashFunction = checkNotNull(hashFunction); in hashFunctionForTesting()
/external/guava/guava-tests/benchmark/com/google/common/hash/
DHashFunctionBenchmark.java54 @Benchmark int hashFunction(int reps) { in hashFunction() method in HashFunctionBenchmark
55 HashFunction hashFunction = hashFunctionEnum.getHashFunction(); in hashFunction() local
58 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction()
DChecksumBenchmark.java85 private byte runHashFunction(int reps, HashFunction hashFunction) { in runHashFunction() argument
91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in runHashFunction()
/external/guava/guava/src/com/google/common/hash/
DHashingOutputStream.java45 public HashingOutputStream(HashFunction hashFunction, OutputStream out) { in HashingOutputStream() argument
47 this.hasher = checkNotNull(hashFunction.newHasher()); in HashingOutputStream()
DHashingInputStream.java41 public HashingInputStream(HashFunction hashFunction, InputStream in) { in HashingInputStream() argument
43 this.hasher = checkNotNull(hashFunction.newHasher()); in HashingInputStream()
/external/guava/guava/src/com/google/common/io/
DByteSource.java295 public HashCode hash(HashFunction hashFunction) throws IOException { in hash() argument
296 Hasher hasher = hashFunction.newHasher(); in hash()
536 public HashCode hash(HashFunction hashFunction) throws IOException { in hash() argument
537 return hashFunction.hashBytes(bytes); in hash()
DFiles.java592 public static HashCode hash(File file, HashFunction hashFunction) in hash() argument
594 return asByteSource(file).hash(hashFunction); in hash()
/external/clang/test/Rewriter/
Drewrite-protocol-type-1.m26 @property int (*hashFunction)(const void *item, int (*size)(const void *item));
/external/clang/test/ARCMT/
Dobjcmt-ns-returns-inner-pointer.m128 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-migrate-all.m129 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-migrate-all.m.result129 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-ns-returns-inner-pointer.m.result128 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));