/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashingInputStreamTest.java | 35 private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'}; field in HashingInputStreamTest 44 buffer = new ByteArrayInputStream(testBytes); in setUp() 66 for (int i = 0; i < testBytes.length; i++) { in testRead_putByteArray() 67 assertEquals(testBytes[i], buf[i]); in testRead_putByteArray() 70 verify(hasher).putBytes(testBytes, 0, testBytes.length); in testRead_putByteArray() 82 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayAtPos() 85 verify(hasher).putBytes(Arrays.copyOf(testBytes, 3), 0, 3); in testRead_putByteArrayAtPos() 93 System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length); in testRead_putByteArrayOutOfBound() 100 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayOutOfBound() 109 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly() [all …]
|
D | AbstractByteHasherTest.java | 32 public void testBytes() { in testBytes() method in AbstractByteHasherTest
|
D | AbstractStreamingHasherTest.java | 39 public void testBytes() { in testBytes() method in AbstractStreamingHasherTest
|
/external/guava/android/guava-tests/test/com/google/common/hash/ |
D | HashingInputStreamTest.java | 35 private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'}; field in HashingInputStreamTest 44 buffer = new ByteArrayInputStream(testBytes); in setUp() 66 for (int i = 0; i < testBytes.length; i++) { in testRead_putByteArray() 67 assertEquals(testBytes[i], buf[i]); in testRead_putByteArray() 70 verify(hasher).putBytes(testBytes, 0, testBytes.length); in testRead_putByteArray() 82 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayAtPos() 85 verify(hasher).putBytes(Arrays.copyOf(testBytes, 3), 0, 3); in testRead_putByteArrayAtPos() 93 System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length); in testRead_putByteArrayOutOfBound() 100 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayOutOfBound() 109 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly() [all …]
|
D | AbstractByteHasherTest.java | 32 public void testBytes() { in testBytes() method in AbstractByteHasherTest
|
D | AbstractStreamingHasherTest.java | 39 public void testBytes() { in testBytes() method in AbstractStreamingHasherTest
|
/external/guava/guava-tests/benchmark/com/google/common/hash/ |
D | HashFunctionBenchmark.java | 46 private byte[] testBytes; field in HashFunctionBenchmark 50 testBytes = new byte[size]; in setUp() 51 random.nextBytes(testBytes); in setUp() 59 result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0]; in hasher() 69 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction() 79 result ^= hashFunction.hashBytes(testBytes, 1, testBytes.length - 1).asBytes()[0]; in hashFunctionWithOffset()
|
D | ChecksumBenchmark.java | 46 private byte[] testBytes; field in ChecksumBenchmark 50 testBytes = new byte[size]; in setUp() 51 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 66 checksum.update(testBytes); in crc32Checksum() 84 checksum.update(testBytes); in adler32Checksum() 98 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in runHashFunction()
|
D | MessageDigestAlgorithmBenchmark.java | 104 private byte[] testBytes; field in MessageDigestAlgorithmBenchmark 108 testBytes = new byte[size]; in setUp() 109 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 118 result ^= hashMethod.hash(algorithm, testBytes)[0]; in hashing()
|
/external/guava/android/guava-tests/benchmark/com/google/common/hash/ |
D | HashFunctionBenchmark.java | 46 private byte[] testBytes; field in HashFunctionBenchmark 50 testBytes = new byte[size]; in setUp() 51 random.nextBytes(testBytes); in setUp() 59 result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0]; in hasher() 69 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction() 79 result ^= hashFunction.hashBytes(testBytes, 1, testBytes.length - 1).asBytes()[0]; in hashFunctionWithOffset()
|
D | ChecksumBenchmark.java | 46 private byte[] testBytes; field in ChecksumBenchmark 50 testBytes = new byte[size]; in setUp() 51 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 66 checksum.update(testBytes); in crc32Checksum() 84 checksum.update(testBytes); in adler32Checksum() 98 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in runHashFunction()
|
D | MessageDigestAlgorithmBenchmark.java | 104 private byte[] testBytes; field in MessageDigestAlgorithmBenchmark 108 testBytes = new byte[size]; in setUp() 109 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 118 result ^= hashMethod.hash(algorithm, testBytes)[0]; in hashing()
|
/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | IsValidUtf8Test.java | 38 import static com.google.protobuf.IsValidUtf8TestUtil.testBytes; 59 testBytes(LITERAL_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 60 testBytes(HEAP_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 61 testBytes(DIRECT_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 66 testBytes(LITERAL_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 67 testBytes(HEAP_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 68 testBytes(DIRECT_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 75 testBytes(LITERAL_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes() 76 testBytes(HEAP_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes() 77 testBytes(DIRECT_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes()
|
D | ByteStringTest.java | 172 byte[] testBytes = testString.getBytes(UTF_16); in testCopyFrom_StringEncoding() 175 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding() 181 byte[] testBytes = testString.getBytes(Internal.UTF_8); in testCopyFrom_Utf8() 184 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Utf8() 188 byte[] testBytes = getTestBytes(77777, 113344L); in testCopyFrom_Iterable() 189 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable() 194 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Iterable() 209 byte[] testBytes = getTestBytes(100); in testCopyFrom_LengthTooBig() 211 ByteString.copyFrom(testBytes, 0, 200); in testCopyFrom_LengthTooBig() 217 ByteString.copyFrom(testBytes, 99, 2); in testCopyFrom_LengthTooBig() [all …]
|
D | RopeByteStringTest.java | 89 byte[] testBytes = ByteStringTest.getTestBytes(numberOfPieces * pieceSize, 113377L); in testBalance() 94 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance() 103 Arrays.equals(testBytes, concatenated.toByteArray())); in testBalance() 104 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
|
D | IsValidUtf8TestUtil.java | 237 static void testBytes(ByteStringFactory factory, int numBytes, long expectedCount) { 238 testBytes(factory, numBytes, expectedCount, 0, -1); 252 static void testBytes(
|
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/zip/ |
D | ZipEncodingTest.java | 167 private void doSimpleEncodingTest(final String name, byte[] testBytes) in doSimpleEncodingTest() argument 172 if (testBytes == null) { in doSimpleEncodingTest() 174 testBytes = new byte[256]; in doSimpleEncodingTest() 176 testBytes[i] = (byte) i; in doSimpleEncodingTest() 180 final String decoded = enc.decode(testBytes); in doSimpleEncodingTest() 186 assertEquals(testBytes, encoded); in doSimpleEncodingTest()
|
/external/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ |
D | RopeByteStringTest.java | 64 byte[] testBytes = ByteStringTest.getTestBytes(numberOfPieces * pieceSize, 113377L); in testBalance() 69 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance() 75 Arrays.equals(testBytes, concatenated.toByteArray())); in testBalance() 76 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
|
D | ByteStringTest.java | 134 byte[] testBytes = testString.getBytes(UTF_16); in testCopyFrom_StringEncoding() 136 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding() 142 byte[] testBytes = testString.getBytes("UTF-8"); in testCopyFrom_Utf8() 144 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Utf8() 148 byte[] testBytes = getTestBytes(77777, 113344L); in testCopyFrom_Iterable() 149 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable() 153 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Iterable() 365 byte[] testBytes = testString.getBytes("UTF-8"); in testToStringUtf8() 366 ByteString byteString = ByteString.copyFrom(testBytes); in testToStringUtf8()
|
/external/guava/guava-tests/test/com/google/common/base/ |
D | Utf8Test.java | 192 testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_1Byte() 198 testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_2Bytes() 205 testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_3Bytes() 306 private static void testBytes(int numBytes, long expectedCount) { in testBytes() method in Utf8Test 307 testBytes(numBytes, expectedCount, 0, -1); in testBytes() 321 private static void testBytes(int numBytes, long expectedCount, long start, long lim) { in testBytes() method in Utf8Test
|
/external/guava/android/guava-tests/test/com/google/common/base/ |
D | Utf8Test.java | 192 testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_1Byte() 198 testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_2Bytes() 205 testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_3Bytes() 306 private static void testBytes(int numBytes, long expectedCount) { in testBytes() method in Utf8Test 307 testBytes(numBytes, expectedCount, 0, -1); in testBytes() 321 private static void testBytes(int numBytes, long expectedCount, long start, long lim) { in testBytes() method in Utf8Test
|
/external/icu/android_icu4j/testing/src/com/android/i18n/test/timezone/internal/ |
D | MemoryMappedFileTest.java | 365 byte[] testBytes = createBytes(12); in checkReadIntArray() 366 File file = createFile(testBytes); in checkReadIntArray() 373 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); in checkReadIntArray() 376 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 3 /* intCount */); in checkReadIntArray() 382 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); in checkReadIntArray() 384 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); in checkReadIntArray() 449 byte[] testBytes = createBytes(12); in checkReadByteArray() 450 File file = createFile(testBytes); in checkReadByteArray() 457 assertReadByteArraySucceeds(iterator, testBytes, 2 /* intCount */); in checkReadByteArray() 460 assertReadByteArraySucceeds(iterator, testBytes, 3 /* intCount */); in checkReadByteArray() [all …]
|
/external/auto/value/src/test/java/com/google/auto/value/processor/ |
D | PropertyAnnotationsTest.java | 93 byte[] testBytes() default {1, 2}; in testBytes() method
|
/external/python/cpython3/Lib/test/ |
D | test_marshal.py | 429 def testBytes(self): member in InstancingTestCase
|
/external/lzma/C/ |
D | 7zArcIn.c | 172 static int TestSignatureCandidate(const Byte *testBytes) in TestSignatureCandidate() argument 176 if (testBytes[i] != k7zSignature[i]) in TestSignatureCandidate()
|