/libcore/ojluni/src/test/java/lang/invoke/VarHandles/ |
D | VarHandleMethodReferenceTest.java | 60 R r; in testMethodReferences() local 61 r = vh::get; in testMethodReferences() 62 r = vh::set; in testMethodReferences() 63 r = vh::getVolatile; in testMethodReferences() 64 r = vh::setVolatile; in testMethodReferences() 65 r = vh::getOpaque; in testMethodReferences() 66 r = vh::setOpaque; in testMethodReferences() 67 r = vh::getAcquire; in testMethodReferences() 68 r = vh::setRelease; in testMethodReferences() 70 r = vh::compareAndSet; in testMethodReferences() [all …]
|
D | VarHandleTestMethodTypeDouble.java | 333 boolean r = vh.compareAndSet(null, 1.0d, 1.0d); in testInstanceFieldWrongMethodType() 336 boolean r = vh.compareAndSet(Void.class, 1.0d, 1.0d); in testInstanceFieldWrongMethodType() 339 boolean r = vh.compareAndSet(recv, Void.class, 1.0d); in testInstanceFieldWrongMethodType() 342 boolean r = vh.compareAndSet(recv, 1.0d, Void.class); in testInstanceFieldWrongMethodType() 345 boolean r = vh.compareAndSet(0, 1.0d, 1.0d); in testInstanceFieldWrongMethodType() 349 boolean r = vh.compareAndSet(); in testInstanceFieldWrongMethodType() 352 boolean r = vh.compareAndSet(recv, 1.0d, 1.0d, Void.class); in testInstanceFieldWrongMethodType() 359 boolean r = vh.weakCompareAndSetPlain(null, 1.0d, 1.0d); in testInstanceFieldWrongMethodType() 362 boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0d, 1.0d); in testInstanceFieldWrongMethodType() 365 boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0d); in testInstanceFieldWrongMethodType() [all …]
|
D | VarHandleTestMethodTypeFloat.java | 333 boolean r = vh.compareAndSet(null, 1.0f, 1.0f); in testInstanceFieldWrongMethodType() 336 boolean r = vh.compareAndSet(Void.class, 1.0f, 1.0f); in testInstanceFieldWrongMethodType() 339 boolean r = vh.compareAndSet(recv, Void.class, 1.0f); in testInstanceFieldWrongMethodType() 342 boolean r = vh.compareAndSet(recv, 1.0f, Void.class); in testInstanceFieldWrongMethodType() 345 boolean r = vh.compareAndSet(0, 1.0f, 1.0f); in testInstanceFieldWrongMethodType() 349 boolean r = vh.compareAndSet(); in testInstanceFieldWrongMethodType() 352 boolean r = vh.compareAndSet(recv, 1.0f, 1.0f, Void.class); in testInstanceFieldWrongMethodType() 359 boolean r = vh.weakCompareAndSetPlain(null, 1.0f, 1.0f); in testInstanceFieldWrongMethodType() 362 boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0f, 1.0f); in testInstanceFieldWrongMethodType() 365 boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0f); in testInstanceFieldWrongMethodType() [all …]
|
D | VarHandleTestMethodTypeBoolean.java | 333 boolean r = vh.compareAndSet(null, true, true); in testInstanceFieldWrongMethodType() 336 boolean r = vh.compareAndSet(Void.class, true, true); in testInstanceFieldWrongMethodType() 339 boolean r = vh.compareAndSet(recv, Void.class, true); in testInstanceFieldWrongMethodType() 342 boolean r = vh.compareAndSet(recv, true, Void.class); in testInstanceFieldWrongMethodType() 345 boolean r = vh.compareAndSet(0, true, true); in testInstanceFieldWrongMethodType() 349 boolean r = vh.compareAndSet(); in testInstanceFieldWrongMethodType() 352 boolean r = vh.compareAndSet(recv, true, true, Void.class); in testInstanceFieldWrongMethodType() 359 boolean r = vh.weakCompareAndSetPlain(null, true, true); in testInstanceFieldWrongMethodType() 362 boolean r = vh.weakCompareAndSetPlain(Void.class, true, true); in testInstanceFieldWrongMethodType() 365 boolean r = vh.weakCompareAndSetPlain(recv, Void.class, true); in testInstanceFieldWrongMethodType() [all …]
|
/libcore/ojluni/src/test/java/util/Random/ |
D | RandomTest.java | 74 Random r = new Random(); in testNextInt() local 75 int f = r.nextInt(); in testNextInt() 77 while (i < NCALLS && r.nextInt() == f) in testNextInt() 86 Random r = new Random(); 87 long f = r.nextLong(); 89 while (i < NCALLS && r.nextLong() == f) 98 Random r = new Random(); 99 boolean f = r.nextBoolean(); 101 while (i < NCALLS && r.nextBoolean() == f) 110 Random r = new Random(); [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | NullCipherTest.java | 102 byte [] r = c.update(b); in testUpdatebyteArray() 103 assertEquals("different length", b.length, r.length); in testUpdatebyteArray() 104 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArray() 112 byte [] r = c.update(b, 0, 5); in testUpdatebyteArrayintint() 113 assertEquals("different length", b.length, r.length); in testUpdatebyteArrayintint() 114 assertTrue("different content", Arrays.equals(b, r)); in testUpdatebyteArrayintint() 116 r = c.update(b, 1, 3); in testUpdatebyteArrayintint() 117 assertEquals("different length", 3, r.length); in testUpdatebyteArrayintint() 119 assertEquals("different content", b[i + 1], r[i]); in testUpdatebyteArrayintint() 128 byte [] r = new byte[5]; in testUpdatebyteArrayintintbyteArray() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandom8Test.java | 43 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize() local 45 () -> r.ints(-1L), in testBadStreamSize() 46 () -> r.ints(-1L, 2, 3), in testBadStreamSize() 47 () -> r.longs(-1L), in testBadStreamSize() 48 () -> r.longs(-1L, -1L, 1L), in testBadStreamSize() 49 () -> r.doubles(-1L), in testBadStreamSize() 50 () -> r.doubles(-1L, .5, .6), in testBadStreamSize() 60 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds() local 62 () -> r.ints(2, 1), in testBadStreamBounds() 63 () -> r.ints(10, 42, 42), in testBadStreamBounds() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ThreadLocalRandom8Test.java | 66 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize() local 68 () -> r.ints(-1L), in testBadStreamSize() 69 () -> r.ints(-1L, 2, 3), in testBadStreamSize() 70 () -> r.longs(-1L), in testBadStreamSize() 71 () -> r.longs(-1L, -1L, 1L), in testBadStreamSize() 72 () -> r.doubles(-1L), in testBadStreamSize() 73 () -> r.doubles(-1L, .5, .6), in testBadStreamSize() 83 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds() local 85 () -> r.ints(2, 1), in testBadStreamBounds() 86 () -> r.ints(10, 42, 42), in testBadStreamBounds() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | CompletableFuture.java | 244 final boolean internalComplete(Object r) { // CAS from null to r in internalComplete() argument 245 return RESULT.compareAndSet(this, null, r); in internalComplete() 306 static Object encodeThrowable(Throwable x, Object r) { in encodeThrowable() argument 309 else if (r instanceof AltResult && x == ((AltResult)r).ex) in encodeThrowable() 310 return r; in encodeThrowable() 322 final boolean completeThrowable(Throwable x, Object r) { in completeThrowable() argument 323 return RESULT.compareAndSet(this, null, encodeThrowable(x, r)); in completeThrowable() 339 static Object encodeRelay(Object r) { in encodeRelay() argument 341 if (r instanceof AltResult in encodeRelay() 342 && (x = ((AltResult)r).ex) != null in encodeRelay() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | AbstractCollection.java | 141 Object[] r = new Object[size()]; in toArray() local 143 for (int i = 0; i < r.length; i++) { in toArray() 145 return Arrays.copyOf(r, i); in toArray() 146 r[i] = it.next(); in toArray() 148 return it.hasNext() ? finishToArray(r, it) : r; in toArray() 183 T[] r = a.length >= size ? a : in toArray() local 188 for (int i = 0; i < r.length; i++) { in toArray() 190 if (a == r) { in toArray() 191 r[i] = null; // null-terminate in toArray() 193 return Arrays.copyOf(r, i); in toArray() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldFileHandlerTest.java | 48 LogRecord r; field in OldFileHandlerTest 77 r = new LogRecord(Level.CONFIG, "msg"); in setUp() 104 handler.publish(r); in testFileHandler() 110 handler.publish(r); in testFileHandler() 114 new LogRecord[] { r, null, r, null, r, null, r }, in testFileHandler() 127 handler.publish(r); in testFileHandler_1params() 134 handler.publish(r); in testFileHandler_1params() 138 r, null, r, null, r, null, r }, new MockFormatter()); in testFileHandler_1params() 146 h.publish(r); in testFileHandler_1params() 147 h2.publish(r); in testFileHandler_1params() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldAndroidStringReaderTest.java | 42 int r; in read() local 45 r = a.read(); in read() 46 if (r != -1) in read() 47 builder.append((char) r); in read() 48 } while (r != -1); in read() 62 int r; in skipRead() local 66 r = a.read(); in skipRead() 67 if (r != -1) in skipRead() 68 builder.append((char) r); in skipRead() 69 } while (r != -1); in skipRead() [all …]
|
D | OldAndroidCharArrayReaderTest.java | 44 int r; in read() local 47 r = a.read(); in read() 48 if (r != -1) in read() 49 builder.append((char) r); in read() 50 } while (r != -1); in read() 64 int r; in skipRead() local 68 r = a.read(); in skipRead() 69 if (r != -1) in skipRead() 70 builder.append((char) r); in skipRead() 71 } while (r != -1); in skipRead() [all …]
|
D | OldAndroidByteArrayInputStreamTest.java | 45 int r; in read() local 48 r = a.read(); in read() 49 if (r != -1) in read() 50 builder.append((char) r); in read() 51 } while (r != -1); in read() 65 int r; in skipRead() local 69 r = a.read(); in skipRead() 70 if (r != -1) in skipRead() 71 builder.append((char) r); in skipRead() 72 } while (r != -1); in skipRead() [all …]
|
D | OldBufferedReaderTest.java | 147 int r = br.read(); in test_read() local 148 assertTrue("Char read improperly", testString.charAt(0) == r); in test_read() 328 BufferedReader r = new BufferedReader(new StringReader("1\r2\n3\r\n4")); in test_readLine_all_line_endings() local 329 assertEquals("1", r.readLine()); in test_readLine_all_line_endings() 330 assertEquals("2", r.readLine()); in test_readLine_all_line_endings() 331 assertEquals("3", r.readLine()); in test_readLine_all_line_endings() 332 assertEquals("4", r.readLine()); in test_readLine_all_line_endings() 333 assertNull(r.readLine()); in test_readLine_all_line_endings() 337 BufferedReader r = new BufferedReader(new StringReader("1\r\n2")); in test_readLine_interaction_with_read() local 338 assertEquals('1', r.read()); in test_readLine_interaction_with_read() [all …]
|
D | OldAndroidBufferedReaderTest.java | 67 int r; in read() local 70 r = a.read(); in read() 71 if (r != -1) in read() 72 builder.append((char) r); in read() 73 } while (r != -1); in read() 87 int r; in skipRead() local 91 r = a.read(); in skipRead() 92 if (r != -1) in skipRead() 93 builder.append((char) r); in skipRead() 94 } while (r != -1); in skipRead() [all …]
|
D | OldAndroidPushbackInputStreamTest.java | 59 int r; in read() local 62 r = a.read(); in read() 63 if (r != -1) in read() 64 builder.append((char) r); in read() 65 } while (r != -1); in read() 79 int r; in skipRead() local 83 r = a.read(); in skipRead() 84 if (r != -1) in skipRead() 85 builder.append((char) r); in skipRead() 86 } while (r != -1); in skipRead() [all …]
|
D | OldAndroidLineNumberReaderTest.java | 81 int r; in read() local 84 r = a.read(); in read() 85 if (r != -1) in read() 86 builder.append((char) r); in read() 87 } while (r != -1); in read() 101 int r; in skipRead() local 105 r = a.read(); in skipRead() 106 if (r != -1) in skipRead() 107 builder.append((char) r); in skipRead() 108 } while (r != -1); in skipRead() [all …]
|
/libcore/ojluni/src/test/java/util/Properties/ |
D | testData3.dos | 2 -monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1, \ 3 -monotype-times new roman-regular-r-normal--*-%d-*-*-p-*-iso8859-2, \ 4 -b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4, \ 5 -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5, \ 6 -monotype-times new roman greek-regular-r-normal--*-%d-*-*-p-*-iso8859-7, \ 7 -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9, \ 8 -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15, \ 9 -hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1, \ 10 -sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0, \ 11 -ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0, \ [all …]
|
D | testData2.dos | 2 …r---*-%d-*-*-p-*-iso8859-1serif.1a-monotype-timesnewroman-regular-r-normal--*-%d-*-*-p-*-iso8859-2…
|
D | testData2 | 2 …r---*-%d-*-*-p-*-iso8859-1serif.1a-monotype-timesnewroman-regular-r-normal--*-%d-*-*-p-*-iso8859-2…
|
/libcore/ojluni/src/test/java/io/Serializable/records/ |
D | CycleTest.java | 60 R r = new R(1, 2, c); in testCycle1() local 61 c.obj = r; // cycle, targeting record r in testCycle1() 63 out.println("serializing : " + r); in testCycle1() 64 R deserializedObj = serializeDeserialize(r); in testCycle1() 81 R r = new R(3, 4, c); in testCycle2() local 82 c.obj = r; // cycle, serializing c first should preserve the cycle in testCycle2() 105 R2 r = new R2(5, 6, c1, c2); in testCycle3() local 107 out.println("serializing : " + r); in testCycle3() 108 R2 deserializedObj = serializeDeserialize(r); in testCycle3() 119 record R3 (long l, R r) implements Serializable { } [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BigIntegerBenchmark.java | 24 Random r = new Random(); in timeRandomDivision() local 25 BigInteger x = new BigInteger(1024, r); in timeRandomDivision() 26 BigInteger y = new BigInteger(1024, r); in timeRandomDivision() 33 Random r = new Random(); in timeRandomGcd() local 34 BigInteger x = new BigInteger(1024, r); in timeRandomGcd() 35 BigInteger y = new BigInteger(1024, r); in timeRandomGcd() 42 Random r = new Random(); in timeRandomMultiplication() local 43 BigInteger x = new BigInteger(1024, r); in timeRandomMultiplication() 44 BigInteger y = new BigInteger(1024, r); in timeRandomMultiplication()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RandomTest.java | 27 private Random r; field in RandomTest 41 Random r = new Random(8409238L); in test_ConstructorJ() local 44 assertTrue("Values from randoms with same seed don't match", r in test_ConstructorJ() 49 Random r = new Random(); in test_setSeed() local 50 r.setSeed(1337); in test_setSeed() 54 assertTrue("Values from randoms with same seed don't match", r in test_setSeed() 66 if (r.nextBoolean()) in test_nextBoolean() 83 r.nextBytes(randomBytes); in test_nextBytes$B() 98 double lastNum = r.nextDouble(); in test_nextDouble() 103 nextNum = r.nextDouble(); in test_nextDouble() [all …]
|
/libcore/luni/src/test/java/tests/java/sql/ |
D | UpdateFunctionalityTest2.java | 189 ResultSet r = statement.executeQuery("SELECT COUNT(*) " + "FROM " in testUpdate5() local 191 r.next(); in testUpdate5() 192 assertEquals("Should be 2 rows", 2, r.getInt(1)); in testUpdate5() 193 r = statement.executeQuery("SELECT COUNT(*) " + "FROM " in testUpdate5() 195 r.next(); in testUpdate5() 196 assertEquals("Should be 0 rows", 0, r.getInt(1)); in testUpdate5() 197 r.close(); in testUpdate5() 232 ResultSet r = statement.executeQuery("SELECT COUNT(*) FROM " in testUpdate7() local 234 r.next(); in testUpdate7() 235 assertEquals("Should be 1 row", 1, r.getInt(1)); in testUpdate7() [all …]
|