- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for TestBytes (0.15 sec)
-
android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java
private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; random.nextBytes(testBytes); } @Benchmark int hasher(int reps) { HashFunction hashFunction = hashFunctionEnum.getHashFunction(); int result = 37; for (int i = 0; i < reps; i++) { result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0]; }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
private static final int RANDOM_SEED = new Random().nextInt(); @Param({"10", "1000", "100000", "1000000"}) private int size; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } // CRC32 @Benchmark byte crc32HashFunction(int reps) { return runHashFunction(reps, Hashing.crc32()); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 13 16:19:15 UTC 2023 - 2.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
byte[] buf = new byte[4]; int numOfByteRead = in.read(buf, 0, buf.length); assertEquals(4, numOfByteRead); for (int i = 0; i < testBytes.length; i++) { assertEquals(testBytes[i], buf[i]); } verify(hasher).putBytes(testBytes, 0, testBytes.length); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
byte[] buf = new byte[4]; int numOfByteRead = in.read(buf, 0, buf.length); assertEquals(4, numOfByteRead); for (int i = 0; i < testBytes.length; i++) { assertEquals(testBytes[i], buf[i]); } verify(hasher).putBytes(testBytes, 0, testBytes.length); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
private static final int RANDOM_SEED = new Random().nextInt(); @Param({"10", "1000", "100000", "1000000"}) private int size; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } // CRC32 @Benchmark byte crc32HashFunction(int reps) { return runHashFunction(reps, Hashing.crc32()); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 13 16:19:15 UTC 2023 - 2.9K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
pkg/util/tail/tail_test.go
if err != nil { t.Fatalf("unable to create temp file") } defer os.Remove(file.Name()) line := strings.Repeat("a", blockSize) testBytes := []byte(line + "\n" + line + "\n" + line + "\n" + line + "\n" + line[blockSize/2:]) // incomplete line file.Write(testBytes) testCases := []struct { name string max int64 longerThanMax bool expected string }{ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 30 13:13:22 UTC 2024 - 2.3K bytes - Viewed (0) -
test/makeslice.go
func main() { n := -1 testInts(uint64(n)) testBytes(uint64(n)) var t *byte if unsafe.Sizeof(t) == 8 { // Test mem > maxAlloc testInts(1 << 59) // Test elem.size*cap overflow testInts(1<<63 - 1) testInts(1<<64 - 1) testBytes(1<<64 - 1) } else { testInts(1<<31 - 1) // Test elem.size*cap overflow testInts(1<<32 - 1) testBytes(1<<32 - 1) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 07 17:50:24 UTC 2020 - 5.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ public class AbstractByteHasherTest extends TestCase { public void testBytes() { TestHasher hasher = new TestHasher(); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; hasher.putByte((byte) 1); hasher.putBytes(new byte[] {2, 3, 4, 5, 6});
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.8K bytes - Viewed (0)