Home
last modified time | relevance | path

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

/external/guava/guava-tests/test/com/google/common/hash/
DHashingInputStreamTest.java36 private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'}; field in HashingInputStreamTest
43 buffer = new ByteArrayInputStream(testBytes); in setUp()
62 EasyMock.expect(hasher.putBytes(aryEq(testBytes), eq(0), eq(testBytes.length))) in testRead_putByteArray()
70 for (int i = 0; i < testBytes.length; i++) { in testRead_putByteArray()
71 assertEquals(testBytes[i], buf[i]); in testRead_putByteArray()
88 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayAtPos()
98 System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length); in testRead_putByteArrayOutOfBound()
108 assertEquals(testBytes[i], buf[i]); in testRead_putByteArrayOutOfBound()
116 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly()
127 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound()
DAbstractByteHasherTest.java33 public void testBytes() { in testBytes() method in AbstractByteHasherTest
DAbstractStreamingHasherTest.java44 public void testBytes() { in testBytes() method in AbstractStreamingHasherTest
/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/protobuf/java/src/test/java/com/google/protobuf/
DRopeByteStringTest.java69 byte[] testBytes = ByteStringTest.getTestBytes(numberOfPieces * pieceSize, 113377L); in testBalance()
74 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance()
80 Arrays.equals(testBytes, concatenated.toByteArray())); in testBalance()
81 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
DIsValidUtf8Test.java59 IsValidUtf8TestUtil.testBytes(1, in testIsValidUtf8_1Byte()
67 IsValidUtf8TestUtil.testBytes(2, in testIsValidUtf8_2Bytes()
75 IsValidUtf8TestUtil.testBytes(3, in testIsValidUtf8_3Bytes()
DByteStringTest.java134 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()
403 byte[] testBytes = testString.getBytes("UTF-8"); in testToStringUtf8()
404 ByteString byteString = ByteString.copyFrom(testBytes); in testToStringUtf8()
DIsValidUtf8TestUtil.java189 static void testBytes(int numBytes, long expectedCount)
191 testBytes(numBytes, expectedCount, 0, -1);
205 static void testBytes(int numBytes, long expectedCount, long start, long lim)
/external/guava/guava-tests/test/com/google/common/base/
DUtf8Test.java167 testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_1Byte()
173 testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_2Bytes()
179 testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); in testIsWellFormed_3Bytes()
282 private static void testBytes(int numBytes, long expectedCount) { in testBytes() method in Utf8Test
283 testBytes(numBytes, expectedCount, 0, -1); in testBytes()
298 private static void testBytes(int numBytes, long expectedCount, long start, in testBytes() method in Utf8Test
/external/lzma/C/
D7zIn.c301 static int TestSignatureCandidate(Byte *testBytes) in TestSignatureCandidate() argument
305 if (testBytes[i] != k7zSignature[i]) in TestSignatureCandidate()
/external/icu/icu4c/source/test/cintltst/
Dnucnvtst.c5318 static const uint8_t testBytes[] = { 0x95, 0xcf, 0x8a, 0xb7, 0x0d, 0x0a, 0x00 }; in TestJitterbug255() local
5319 const char *testBuffer = (const char *)testBytes; in TestJitterbug255()
5320 const char *testEnd = (const char *)testBytes + sizeof(testBytes); in TestJitterbug255()