/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashingInputStreamTest.java | 37 private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'}; field in HashingInputStreamTest 44 buffer = new ByteArrayInputStream(testBytes); in setUp() 63 EasyMock.expect(hasher.putBytes(aryEq(testBytes), eq(0), eq(testBytes.length))) in testRead_putByteArray() 71 for (int i = 0; i < testBytes.length; i++) { in testRead_putByteArray() 72 assertEquals(testBytes[i], buf[i]); in testRead_putByteArray() 80 EasyMock.expect(hasher.putBytes(aryEq(Arrays.copyOfRange(testBytes, 0, 3)), eq(0), eq(3))) in testRead_putByteArrayAtPos() 89 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayAtPos() 99 System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length); in testRead_putByteArrayOutOfBound() 109 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayOutOfBound() 117 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 | 43 public void testBytes() { in testBytes() method in AbstractStreamingHasherTest
|
/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | IsValidUtf8Test.java | 38 import static com.google.protobuf.IsValidUtf8TestUtil.testBytes; 64 testBytes(LITERAL_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 65 testBytes(HEAP_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 66 testBytes(DIRECT_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_1Byte() 73 testBytes(LITERAL_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 74 testBytes(HEAP_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 75 testBytes(DIRECT_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_2Bytes() 84 testBytes(LITERAL_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes() 85 testBytes(HEAP_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes() 86 testBytes(DIRECT_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsValidUtf8_3Bytes()
|
D | ByteStringTest.java | 135 byte[] testBytes = testString.getBytes(UTF_16); in testCopyFrom_StringEncoding() 137 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding() 143 byte[] testBytes = testString.getBytes(Internal.UTF_8); in testCopyFrom_Utf8() 145 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Utf8() 149 byte[] testBytes = getTestBytes(77777, 113344L); in testCopyFrom_Iterable() 150 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable() 154 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Iterable() 405 byte[] testBytes = testString.getBytes(Internal.UTF_8); in testToStringUtf8() 406 ByteString byteString = ByteString.copyFrom(testBytes); in testToStringUtf8()
|
D | RopeByteStringTest.java | 74 byte[] testBytes = ByteStringTest.getTestBytes(numberOfPieces * pieceSize, 113377L); in testBalance() 79 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance() 85 Arrays.equals(testBytes, concatenated.toByteArray())); in testBalance() 86 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
|
D | IsValidUtf8TestUtil.java | 230 static void testBytes(ByteStringFactory factory, int numBytes, long expectedCount) { 231 testBytes(factory, numBytes, expectedCount, 0, -1); 246 static void testBytes(
|
/external/guava/guava-tests/benchmark/com/google/common/hash/ |
D | ChecksumBenchmark.java | 43 private byte[] testBytes; field in ChecksumBenchmark 47 testBytes = new byte[size]; in setUp() 48 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 61 checksum.update(testBytes); in crc32Checksum() 77 checksum.update(testBytes); in adler32Checksum() 91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in runHashFunction()
|
D | HashFunctionBenchmark.java | 47 private byte[] testBytes; field in HashFunctionBenchmark 50 testBytes = new byte[size]; in setUp() 51 random.nextBytes(testBytes); in setUp() 58 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction()
|
D | MessageDigestAlgorithmBenchmark.java | 90 private byte[] testBytes; field in MessageDigestAlgorithmBenchmark 93 testBytes = new byte[size]; in setUp() 94 new Random(RANDOM_SEED).nextBytes(testBytes); in setUp() 102 result ^= hashMethod.hash(algorithm, testBytes)[0]; in hashing()
|
/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/guava/guava-tests/test/com/google/common/base/ |
D | Utf8Test.java | 166 testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_1Byte() 172 testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_2Bytes() 178 testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_3Bytes() 281 private static void testBytes(int numBytes, long expectedCount) { in testBytes() method in Utf8Test 282 testBytes(numBytes, expectedCount, 0, -1); in testBytes() 297 private static void testBytes(int numBytes, long expectedCount, long start, in testBytes() method in Utf8Test
|
/external/protobuf/objectivec/Tests/ |
D | GPBCodedInputStreamTests.m | 124 - (void)testBytes { method in self
|
/external/lzma/C/ |
D | 7zArcIn.c | 172 static int TestSignatureCandidate(const Byte *testBytes) in TestSignatureCandidate() argument 176 if (testBytes[i] != k7zSignature[i]) in TestSignatureCandidate()
|
/external/icu/icu4c/source/test/cintltst/ |
D | nucnvtst.c | 5330 static const uint8_t testBytes[] = { 0x95, 0xcf, 0x8a, 0xb7, 0x0d, 0x0a, 0x00 }; in TestJitterbug255() local 5331 const char *testBuffer = (const char *)testBytes; in TestJitterbug255() 5332 const char *testEnd = (const char *)testBytes + sizeof(testBytes); in TestJitterbug255()
|
/external/fonttools/Tests/ufoLib/ |
D | UFO3_test.py | 4219 testBytes = b"test" 4221 writer.writeBytesToPath(path, testBytes) 4226 self.assertEqual(testBytes, written) 4241 testBytes = b"test" 4243 writer.writeBytesToPath(path, testBytes) 4248 self.assertEqual(testBytes, written)
|