/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/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 | 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 | 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 | 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 | 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 …]
|
D | OldAndroidPushbackReaderTest.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()
|
D | OldAndroidDataInputStreamTest.java | 109 int r; in read() local 112 r = a.read(); in read() 113 if (r != -1) in read() 114 builder.append((char) r); in read() 115 } while (r != -1); in read() 129 int r; in skipRead() local 133 r = a.read(); in skipRead() 134 if (r != -1) in skipRead() 135 builder.append((char) r); in skipRead() 136 } while (r != -1); in skipRead() [all …]
|
D | OldAndroidBufferedInputStreamTest.java | 83 int r; in read() local 86 r = a.read(); in read() 87 if (r != -1) in read() 88 builder.append((char) r); in read() 89 } while (r != -1); in read() 94 int r; in skipRead() local 98 r = a.read(); in skipRead() 99 if (r != -1) in skipRead() 100 builder.append((char) r); in skipRead() 101 } while (r != -1); in skipRead()
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldFileHandlerTest.java | 47 LogRecord r; field in OldFileHandlerTest 77 r = new LogRecord(Level.CONFIG, "msg"); in setUp() 102 handler.publish(r); in testFileHandler() 108 handler.publish(r); in testFileHandler() 112 new LogRecord[] { r, null, r, null, r, null, r }, in testFileHandler() 126 handler.publish(r); in testFileHandler_1params() 133 handler.publish(r); in testFileHandler_1params() 137 r, null, r, null, r, null, r }, new MockFormatter()); in testFileHandler_1params() 145 h.publish(r); in testFileHandler_1params() 146 h2.publish(r); in testFileHandler_1params() [all …]
|
/libcore/luni/src/main/java/java/util/logging/ |
D | XMLFormatter.java | 49 public String format(LogRecord r) { in format() argument 51 long time = r.getMillis(); in format() 60 append(sb, 1, "sequence", r.getSequenceNumber()); in format() 61 if (r.getLoggerName() != null) { in format() 62 append(sb, 1, "logger", r.getLoggerName()); in format() 64 append(sb, 1, "level", r.getLevel().getName()); in format() 65 if (r.getSourceClassName() != null) { in format() 66 append(sb, 1, "class", r.getSourceClassName()); in format() 68 if (r.getSourceMethodName() != null) { in format() 69 append(sb, 1, "method", r.getSourceMethodName()); in format() [all …]
|
D | SimpleFormatter.java | 46 public String format(LogRecord r) { in format() argument 49 new Object[] { new Date(r.getMillis()) })); in format() 50 sb.append(r.getSourceClassName()).append(" "); in format() 51 sb.append(r.getSourceMethodName()).append(System.lineSeparator()); in format() 52 sb.append(r.getLevel().getName()).append(": "); in format() 53 sb.append(formatMessage(r)).append(System.lineSeparator()); in format() 54 if (r.getThrown() != null) { in format() 56 Throwable t = r.getThrown(); in format()
|
D | Formatter.java | 46 public abstract String format(LogRecord r); in format() argument 63 public String formatMessage(LogRecord r) { in formatMessage() argument 64 String pattern = r.getMessage(); in formatMessage() 67 if ((rb = r.getResourceBundle()) != null) { in formatMessage() 71 pattern = r.getMessage(); in formatMessage() 75 Object[] params = r.getParameters(); in formatMessage() 84 pattern = r.getMessage(); in formatMessage()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BigIntegerBenchmark.java | 26 Random r = new Random(); in timeRandomDivision() local 27 BigInteger x = new BigInteger(1024, r); in timeRandomDivision() 28 BigInteger y = new BigInteger(1024, r); in timeRandomDivision() 35 Random r = new Random(); in timeRandomGcd() local 36 BigInteger x = new BigInteger(1024, r); in timeRandomGcd() 37 BigInteger y = new BigInteger(1024, r); in timeRandomGcd() 44 Random r = new Random(); in timeRandomMultiplication() local 45 BigInteger x = new BigInteger(1024, r); in timeRandomMultiplication() 46 BigInteger y = new BigInteger(1024, r); in timeRandomMultiplication()
|
/libcore/luni/src/main/java/java/math/ |
D | BigInt.java | 233 BigInt r = newBigInt(); in shift() local 234 NativeBN.BN_shift(r.bignum, a.bignum, n); in shift() 235 return r; in shift() 255 BigInt r = newBigInt(); in addition() local 256 NativeBN.BN_add(r.bignum, a.bignum, b.bignum); in addition() 257 return r; in addition() 265 BigInt r = newBigInt(); in subtraction() local 266 NativeBN.BN_sub(r.bignum, a.bignum, b.bignum); in subtraction() 267 return r; in subtraction() 272 BigInt r = newBigInt(); in gcd() local [all …]
|
D | NativeBN.java | 79 public static native void BN_shift(long r, long a, int n); in BN_shift() argument 94 public static native void BN_add(long r, long a, long b); in BN_add() argument 97 public static native void BN_sub(long r, long a, long b); in BN_sub() argument 100 public static native void BN_gcd(long r, long a, long b); in BN_gcd() argument 103 public static native void BN_mul(long r, long a, long b); in BN_mul() argument 106 public static native void BN_exp(long r, long a, long p); in BN_exp() argument 112 public static native void BN_nnmod(long r, long a, long m); in BN_nnmod() argument 115 public static native void BN_mod_exp(long r, long a, long p, long m); in BN_mod_exp() argument
|
/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 …]
|
D | InsertFunctionalityTest.java | 162 ResultSet r = statement.executeQuery("SELECT COUNT(*) FROM " in testInsert3() local 164 r.next(); in testInsert3() 165 assertEquals("Should be 2 rows", 2, r.getInt(1)); in testInsert3() 166 r.close(); in testInsert3() 178 ResultSet r = statement.executeQuery("SELECT COUNT(*) FROM " in testInsert4() local 182 r.next(); in testInsert4() 183 assertEquals("Should be 2 rows", 2, r.getInt(1)); in testInsert4() 184 r.close(); in testInsert4() 196 ResultSet r = statement.executeQuery("SELECT COUNT(*) FROM " in testInsert5() local 198 r.next(); in testInsert5() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | RuntimeTest.java | 28 Runtime r = Runtime.getRuntime(); field in RuntimeTest 106 r.gc(); in test_runFinalization() 107 r.runFinalization(); in test_runFinalization() 117 assertTrue("freeMemory < 0", r.freeMemory() >= 0); in test_memory() 118 assertTrue("totalMemory() < freeMemory()", r.totalMemory() >= r.freeMemory()); in test_memory() 119 assertTrue("maxMemory() < totalMemory()", r.maxMemory() >= r.totalMemory()); in test_memory()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RandomTest.java | 26 Random r; field in RandomTest 40 Random r = new Random(8409238L); in test_ConstructorJ() local 43 assertTrue("Values from randoms with same seed don't match", r in test_ConstructorJ() 54 if (r.nextBoolean()) in test_nextBoolean() 71 r.nextBytes(randomBytes); in test_nextBytes$B() 86 double lastNum = r.nextDouble(); in test_nextDouble() 91 nextNum = r.nextDouble(); in test_nextDouble() 110 float lastNum = r.nextFloat(); in test_nextFloat() 115 nextNum = r.nextFloat(); in test_nextFloat() 133 double lastNum = r.nextGaussian(); in test_nextGaussian() [all …]
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | CoderResult.java | 116 CoderResult r = _malformedErrors.get(key); in malformedForLength() local 117 if (r == null) { in malformedForLength() 118 r = new CoderResult(TYPE_MALFORMED_INPUT, length); in malformedForLength() 119 _malformedErrors.put(key, r); in malformedForLength() 121 return r; in malformedForLength() 144 CoderResult r = _unmappableErrors.get(key); in unmappableForLength() local 145 if (r == null) { in unmappableForLength() 146 r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length); in unmappableForLength() 147 _unmappableErrors.put(key, r); in unmappableForLength() 149 return r; in unmappableForLength()
|
/libcore/luni/src/main/java/java/lang/ref/ |
D | SoftReference.java | 86 public SoftReference(T r) { in SoftReference() argument 87 super(r, null); in SoftReference() 99 public SoftReference(T r, ReferenceQueue<? super T> q) { in SoftReference() argument 100 super(r, q); in SoftReference()
|
D | WeakReference.java | 94 public WeakReference(T r) { in WeakReference() argument 95 super(r, null); in WeakReference() 107 public WeakReference(T r, ReferenceQueue<? super T> q) { in WeakReference() argument 108 super(r, q); in WeakReference()
|