/external/guava/guava-tests/benchmark/com/google/common/hash/ |
HashFunctionBenchmark.java | 47 private byte[] testBytes; 50 testBytes = new byte[size]; 51 random.nextBytes(testBytes); 58 result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
|
ChecksumBenchmark.java | 43 private byte[] testBytes; 47 testBytes = new byte[size]; 48 new Random(RANDOM_SEED).nextBytes(testBytes); 61 checksum.update(testBytes); 77 checksum.update(testBytes); 91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
|
MessageDigestAlgorithmBenchmark.java | 90 private byte[] testBytes; 93 testBytes = new byte[size]; 94 new Random(RANDOM_SEED).nextBytes(testBytes); 102 result ^= hashMethod.hash(algorithm, testBytes)[0];
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
OldCharset_ISO_8859_10.java | 42 testBytes = theseBytes(new int[]{
|
OldCharset_ISO_8859_14.java | 43 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_Big5.java | 162 testBytes = theseBytes(new int[]{ [all...] |
OldCharset_MultiByte_Big5_Android.java | 121 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_EUC_KR.java | 178 testBytes = theseBytes(new int[]{ [all...] |
OldCharset_MultiByte_GBK.java | 191 testBytes = theseBytes(new int[]{ [all...] |
OldCharset_MultiByte_GBK_Android.java | 191 testBytes = theseBytes(new int[]{ [all...] |
OldCharset_MultiByte_UTF_16.java | 142 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_UTF_16BE.java | 142 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_UTF_16LE.java | 142 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_UTF_8.java | 142 testBytes = theseBytes(new int[]{ [all...] |
OldCharset_macintosh.java | 42 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_EUC_JP.java | 22 testBytes = theseBytes(0xc5, 0xec, 0xb5, 0xfe, ' ',
|
OldCharset_MultiByte_GB2312.java | 78 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_x_windows_950.java | 94 testBytes = theseBytes(new int[]{
|
OldCharset_MultiByte_ISO_2022_JP.java | 24 testBytes = theseBytes(0x1b, 0x24, 0x42, 0x45, 0x6c, 0x35, 0x7e, 0x1b,
|
/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
IsValidUtf8Test.java | 38 import static com.google.protobuf.IsValidUtf8TestUtil.testBytes; 64 testBytes(LITERAL_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); 65 testBytes(HEAP_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); 66 testBytes(DIRECT_NIO_FACTORY, 1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); 73 testBytes(LITERAL_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); 74 testBytes(HEAP_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); 75 testBytes(DIRECT_NIO_FACTORY, 2, IsValidUtf8TestUtil.EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); 84 testBytes(LITERAL_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); 85 testBytes(HEAP_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); 86 testBytes(DIRECT_NIO_FACTORY, 3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT) [all...] |
/external/guava/guava-tests/test/com/google/common/hash/ |
HashingInputStreamTest.java | 37 private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'}; 44 buffer = new ByteArrayInputStream(testBytes); 63 EasyMock.expect(hasher.putBytes(aryEq(testBytes), eq(0), eq(testBytes.length))) 71 for (int i = 0; i < testBytes.length; i++) { 72 assertEquals(testBytes[i], buf[i]); 80 EasyMock.expect(hasher.putBytes(aryEq(Arrays.copyOfRange(testBytes, 0, 3)), eq(0), eq(3))) 89 assertEquals(testBytes[i], buf[i]); 99 System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length) [all...] |
/external/guava/guava-tests/test/com/google/common/base/ |
Utf8Test.java | 166 testBytes(1, EXPECTED_ONE_BYTE_ROUNDTRIPPABLE_COUNT); 172 testBytes(2, EXPECTED_TWO_BYTE_ROUNDTRIPPABLE_COUNT); 178 testBytes(3, EXPECTED_THREE_BYTE_ROUNDTRIPPABLE_COUNT); 281 private static void testBytes(int numBytes, long expectedCount) { 282 testBytes(numBytes, expectedCount, 0, -1); 297 private static void testBytes(int numBytes, long expectedCount, long start,
|
/libcore/luni/src/test/java/libcore/libcore/io/ |
MemoryMappedFileTest.java | 367 byte[] testBytes = createBytes(12); 368 File file = createFile(testBytes); 375 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); 378 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 3 /* intCount */); 384 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); 386 assertReadIntArraySucceeds(iterator, testBytes, byteOrdering, 2 /* intCount */); 451 byte[] testBytes = createBytes(12); 452 File file = createFile(testBytes); 459 assertReadByteArraySucceeds(iterator, testBytes, 2 /* intCount */); 462 assertReadByteArraySucceeds(iterator, testBytes, 3 /* intCount */) [all...] |
/prebuilts/go/darwin-x86/src/bytes/ |
buffer_test.go | 18 var testBytes []byte // test data; same as testString but as a slice. 25 testBytes = make([]byte, N) 27 testBytes[i] = 'a' + byte(i%26) 29 testString = string(testBytes) 92 buf := NewBuffer(testBytes) 133 n, err := buf.Write(testBytes[0:1]) 145 n, err = buf.Write(testBytes[2:26]) 195 s := fillBytes(t, "TestLargeWrites (1)", &buf, "", 5, testBytes) 213 s := fillBytes(t, "TestLargeReads (1)", &buf, "", 5, testBytes[0:len(testBytes)/i] [all...] |
/prebuilts/go/linux-x86/src/bytes/ |
buffer_test.go | 18 var testBytes []byte // test data; same as testString but as a slice. 25 testBytes = make([]byte, N) 27 testBytes[i] = 'a' + byte(i%26) 29 testString = string(testBytes) 92 buf := NewBuffer(testBytes) 133 n, err := buf.Write(testBytes[0:1]) 145 n, err = buf.Write(testBytes[2:26]) 195 s := fillBytes(t, "TestLargeWrites (1)", &buf, "", 5, testBytes) 213 s := fillBytes(t, "TestLargeReads (1)", &buf, "", 5, testBytes[0:len(testBytes)/i] [all...] |