- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for testBytes (0.05 sec)
-
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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.4K 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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 5K bytes - Viewed (0) -
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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 2.4K 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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.4K bytes - Viewed (0) -
src/bytes/buffer_test.go
var testString string // test data for write tests var testBytes []byte // test data; same as testString but as a slice. type negativeReader struct{} func (r *negativeReader) Read([]byte) (int, error) { return -1, nil } func init() { testBytes = make([]byte, N) for i := 0; i < N; i++ { testBytes[i] = 'a' + byte(i%26) } testString = string(testBytes) } // Verify that contents of buf match the string s.
Registered: 2025-05-27 11:13 - Last Modified: 2025-05-19 16:13 - 18.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/Utf8Test.java
@GwtIncompatible // java.nio.charset.Charset public void testIsWellFormed_1Byte() { testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); } /** Tests that round tripping of all two byte permutations work. */ @GwtIncompatible // java.nio.charset.Charset public void testIsWellFormed_2Bytes() { testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); }
Registered: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 12.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import org.jspecify.annotations.NullUnmarked; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ @NullUnmarked 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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import org.jspecify.annotations.NullUnmarked; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ @NullUnmarked 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: 2025-05-30 12:43 - Last Modified: 2024-12-19 18:03 - 3.8K bytes - Viewed (0)