Home
last modified time | relevance | path

Searched refs:testBytes (Results 1 – 16 of 16) sorted by relevance

/external/guava/guava-tests/test/com/google/common/hash/
DHashingInputStreamTest.java37 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 …]
DAbstractByteHasherTest.java32 public void testBytes() { in testBytes() method in AbstractByteHasherTest
DAbstractStreamingHasherTest.java43 public void testBytes() { in testBytes() method in AbstractStreamingHasherTest
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DIsValidUtf8Test.java38 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()
DByteStringTest.java135 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()
DRopeByteStringTest.java74 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()
DIsValidUtf8TestUtil.java230 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/
DChecksumBenchmark.java43 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()
DHashFunctionBenchmark.java47 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()
DMessageDigestAlgorithmBenchmark.java90 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/
DZipEncodingTest.java167 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/
DUtf8Test.java166 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/
DGPBCodedInputStreamTests.m124 - (void)testBytes { method in self
/external/lzma/C/
D7zArcIn.c172 static int TestSignatureCandidate(const Byte *testBytes) in TestSignatureCandidate() argument
176 if (testBytes[i] != k7zSignature[i]) in TestSignatureCandidate()
/external/icu/icu4c/source/test/cintltst/
Dnucnvtst.c5330 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/
DUFO3_test.py4219 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)