/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | AtomicIntegerArrayTest.java | 40 AtomicIntegerArray arr = new AtomicIntegerArray(expectedArray); in testCompareAndExchange() local 41 for (int i = arr.length() - 1; i >= 0; --i) { in testCompareAndExchange() 42 assertEquals(expectedArray[i], arr.compareAndExchange(i, 0, i+1)); in testCompareAndExchange() 43 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 45 assertEquals(expectedArray[i], arr.compareAndExchange(i, expectedArray[i], i+1)); in testCompareAndExchange() 46 assertEquals(i+1, arr.get(i)); in testCompareAndExchange() 48 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 50 assertEquals(i+1, arr.compareAndExchange(i, i+1, -1)); in testCompareAndExchange() 51 assertEquals(-1, arr.get(i)); in testCompareAndExchange() 53 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() [all …]
|
D | AtomicLongArrayTest.java | 40 AtomicLongArray arr = new AtomicLongArray(expectedArray); in testCompareAndExchange() local 41 for (int i = 0; i < arr.length(); ++i) { in testCompareAndExchange() 42 assertEquals(expectedArray[i], arr.compareAndExchange(i, 0, i+1)); in testCompareAndExchange() 43 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 45 assertEquals(expectedArray[i], arr.compareAndExchange(i, expectedArray[i], i+1)); in testCompareAndExchange() 46 assertEquals(i+1, arr.get(i)); in testCompareAndExchange() 48 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 50 assertEquals(i+1, arr.compareAndExchange(i, i+1, -1)); in testCompareAndExchange() 51 assertEquals(-1, arr.get(i)); in testCompareAndExchange() 53 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() [all …]
|
D | AtomicReferenceArrayTest.java | 46 AtomicReferenceArray<Integer> arr = new AtomicReferenceArray(expectedArray); in testCompareAndExchange() local 47 for (int i = 0; i < arr.length(); ++i) { in testCompareAndExchange() 49 assertEquals(expectedArray[i], arr.compareAndExchange(i, Integer.valueOf(0), val)); in testCompareAndExchange() 50 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 52 assertEquals(expectedArray[i], arr.compareAndExchange(i, expectedArray[i], val)); in testCompareAndExchange() 53 assertSame(val, arr.get(i)); in testCompareAndExchange() 54 assertEquals(i+1, arr.get(i).intValue()); in testCompareAndExchange() 56 checkArrayAsExpected(expectedArray, arr); in testCompareAndExchange() 59 assertEquals(expectedArray[i], arr.compareAndExchange(i, expectedArray[i], val)); in testCompareAndExchange() 60 assertSame(val, arr.get(i)); in testCompareAndExchange() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetDecoderTest.java | 42 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_no_offset() 43 ByteBuffer inBuffer = ByteBuffer.wrap(arr, 0, arr.length).slice(); in test_ByteArray_decode_no_offset() 44 CharBuffer outBuffer = CharBuffer.allocate(arr.length); in test_ByteArray_decode_no_offset() 56 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_with_offset() 57 arr = prependByteToByteArray(arr, Integer.valueOf(1).byteValue()); in test_ByteArray_decode_with_offset() 59 ByteBuffer inBuffer = ByteBuffer.wrap(arr, offset, arr.length - offset).slice(); in test_ByteArray_decode_with_offset() 60 CharBuffer outBuffer = CharBuffer.allocate(arr.length - offset); in test_ByteArray_decode_with_offset() 72 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_with_offset_using_facade_method() 73 arr = prependByteToByteArray(arr, Integer.valueOf(1).byteValue()); in test_ByteArray_decode_with_offset_using_facade_method() 75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset)); in test_ByteArray_decode_with_offset_using_facade_method() [all …]
|
/libcore/ojluni/src/test/java/lang/String/ |
D | LiteralReplace.java | 236 Object[] arr = {null, "", "a", "b", "string", "str", "ababstrstr"}; in sourceTargetReplacementWithNull() local 237 for (int i = 0; i < arr.length; ++i) { in sourceTargetReplacementWithNull() 238 for (int j = 0; j < arr.length; ++j) { in sourceTargetReplacementWithNull() 239 for (int k = 0; k < arr.length; ++k) { in sourceTargetReplacementWithNull() 240 if (arr[i] != null && (arr[j] == null || arr[k] == null)) { in sourceTargetReplacementWithNull() 241 list.add(makeArray(arr[i], arr[j], arr[k])); in sourceTargetReplacementWithNull()
|
/libcore/ojluni/src/test/java/lang/String/concat/ |
D | ImplicitStringConcatAssignLHS.java | 111 Object[] arr = new Object[ARR_SIZE]; in testImplicitStringConcatAssignLHS() local 112 arr[x++] += "foo"; in testImplicitStringConcatAssignLHS() 130 String[] arr = new String[ARR_SIZE]; in testImplicitStringConcatAssignLHS() local 131 arr[x++] += "foo"; in testImplicitStringConcatAssignLHS() 149 CharSequence[] arr = new CharSequence[ARR_SIZE]; in testImplicitStringConcatAssignLHS() local 150 arr[x++] += "foo"; in testImplicitStringConcatAssignLHS()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | CollatorTest.java | 74 byte [] arr = mColl.getCollationKey(sixteen).toByteArray(); in test_collationKeySize() 75 int len = arr.length; in test_collationKeySize() 76 assertTrue("Collation key not 0 terminated", arr[arr.length - 1] == 0); in test_collationKeySize() 78 String foo = new String(arr, 0, len, "iso8859-1"); in test_collationKeySize() 80 arr = mColl.getCollationKey(sixteen).toByteArray(); in test_collationKeySize() 81 len = arr.length; in test_collationKeySize() 82 assertTrue("Collation key not 0 terminated", arr[arr.length - 1] == 0); in test_collationKeySize() 84 String bar = new String(arr, 0, len, "iso8859-1"); in test_collationKeySize()
|
/libcore/ojluni/src/test/java/io/PrintStream/ |
D | WriteBytes.java | 65 byte[] arr = baos.toByteArray(); in testWriteBytes() 66 assertEquals(arr.length, 2*buf.length, "Array length " + arr.length + in testWriteBytes() 68 assertTrue(Arrays.equals(buf, 0, buf.length, arr, 0, buf.length), in testWriteBytes() 70 assertTrue(Arrays.equals(buf, 0, buf.length, arr, buf.length, in testWriteBytes()
|
/libcore/ojluni/src/main/native/ |
D | LinuxWatchService.c | 63 jint arr[5]; in Java_sun_nio_fs_LinuxWatchService_eventOffsets() local 64 arr[0] = (jint)offsetof(struct inotify_event, wd); in Java_sun_nio_fs_LinuxWatchService_eventOffsets() 65 arr[1] = (jint)offsetof(struct inotify_event, mask); in Java_sun_nio_fs_LinuxWatchService_eventOffsets() 66 arr[2] = (jint)offsetof(struct inotify_event, cookie); in Java_sun_nio_fs_LinuxWatchService_eventOffsets() 67 arr[3] = (jint)offsetof(struct inotify_event, len); in Java_sun_nio_fs_LinuxWatchService_eventOffsets() 68 arr[4] = (jint)offsetof(struct inotify_event, name); in Java_sun_nio_fs_LinuxWatchService_eventOffsets() 69 (*env)->SetIntArrayRegion(env, result, 0, 5, arr); in Java_sun_nio_fs_LinuxWatchService_eventOffsets()
|
/libcore/ojluni/src/test/java/nio/channels/Channels/ |
D | TinyBuffers.java | 46 char [] arr = new char[100]; in test() local 47 System.out.println(r.read(arr, 0, arr.length)); in test()
|
/libcore/ojluni/src/main/java/java/util/prefs/ |
D | Base64.java | 245 byte[] arr = new byte[j]; in main() 247 arr[k] = (byte)rnd.nextInt(); in main() 249 String s = byteArrayToBase64(arr); in main() 251 if (!java.util.Arrays.equals(arr, b)) in main() 254 s = byteArrayToAltBase64(arr); in main() 256 if (!java.util.Arrays.equals(arr, b)) in main()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | ZipFileTest.java | 120 byte[] arr = new byte[1024]; in readResource() 122 while ((read = is.read(arr)) >= 0) { in readResource() 123 fos.write(arr, 0, read); in readResource()
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | DoubleStreamTestDataProvider.java | 52 for (double[] arr : arrays) { 53 for (int i = 0; i < arr.length; i++) { 54 arr[i] = i;
|
D | IntStreamTestDataProvider.java | 51 for (int[] arr : arrays) { 52 for (int i = 0; i < arr.length; i++) { 53 arr[i] = i;
|
D | LongStreamTestDataProvider.java | 51 for (long[] arr : arrays) { 52 for (int i = 0; i < arr.length; i++) { 53 arr[i] = i;
|
D | StreamTestDataProvider.java | 59 for (Integer[] arr : arrays) { 60 for (int i = 0; i < arr.length; i++) { 61 arr[i] = i;
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | DoubleStreamTestDataProvider.java | 48 for (double[] arr : arrays) { 49 for (int i = 0; i < arr.length; i++) { 50 arr[i] = i;
|
D | LongStreamTestDataProvider.java | 48 for (long[] arr : arrays) { 49 for (int i = 0; i < arr.length; i++) { 50 arr[i] = i;
|
D | IntStreamTestDataProvider.java | 48 for (int[] arr : arrays) { 49 for (int i = 0; i < arr.length; i++) { 50 arr[i] = i;
|
D | StreamTestDataProvider.java | 54 for (Integer[] arr : arrays) { 55 for (int i = 0; i < arr.length; i++) { 56 arr[i] = i;
|
/libcore/ojluni/src/main/java/java/net/ |
D | InetAddress.java | 662 InetAddress[] arr = nameService.lookupAllHostAddr(host, NETID_UNSET); in getHostFromNameService() local 665 if (arr != null) { in getHostFromNameService() 666 for(int i = 0; !ok && i < arr.length; i++) { in getHostFromNameService() 667 ok = addr.equals(arr[i]); in getHostFromNameService()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | CertificateFactory1Test.java | 440 byte[] arr = os.toByteArray(); in testCertificateFactory11() 443 is = new ByteArrayInputStream(arr); in testCertificateFactory11() 449 is = new ByteArrayInputStream(arr); in testCertificateFactory11() 457 is = new ByteArrayInputStream(arr); in testCertificateFactory11() 463 is = new ByteArrayInputStream(arr); in testCertificateFactory11() 546 byte[] arr = os.toByteArray(); in testCertificateFactory13() 547 ByteArrayInputStream is = new ByteArrayInputStream(arr); in testCertificateFactory13()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 206 private boolean findEl(Object[] arr, Object el) { in findEl() argument 208 for (int i = 0; i < arr.length; i++) { in findEl() 209 if (arr[i].equals(el)) { in findEl()
|
/libcore/luni/src/test/java/tests/com/android/org/bouncycastle/jce/provider/ |
D | CertBlocklistTest.java | 154 Set<byte[]> arr = bl.pubkeyBlocklist; in getPubkeyBlocklist() local 157 for (byte[] value: arr) { in getPubkeyBlocklist() 167 Set<BigInteger> arr = bl.serialBlocklist; in getSerialBlocklist() local 170 for (BigInteger value: arr) { in getSerialBlocklist()
|
/libcore/luni/src/main/native/ |
D | libcore_math_NativeBN.cpp | 91 static void NativeBN_litEndInts2bn(JNIEnv* env, jclass, jintArray arr, int len, jboolean neg, jlong… in NativeBN_litEndInts2bn() argument 94 ScopedIntArrayRO scopedArray(env, arr); in NativeBN_litEndInts2bn()
|