/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ForkJoinPool8Test.java | 230 FibAction f = new FibAction(8); in testInvoke() 231 assertNull(f.invoke()); in testInvoke() 232 assertEquals(21, f.result); in testInvoke() 233 checkCompletedNormally(f); in testInvoke() 246 FibAction f = new FibAction(8); in testQuietlyInvoke() 247 f.quietlyInvoke(); in testQuietlyInvoke() 248 assertEquals(21, f.result); in testQuietlyInvoke() 249 checkCompletedNormally(f); in testQuietlyInvoke() 260 FibAction f = new FibAction(8); in testForkJoin() 261 assertSame(f, f.fork()); in testForkJoin() [all …]
|
D | ForkJoinTaskTest.java | 345 AsyncFib f = this; 346 int n = f.number; 348 AsyncFib p = f; 350 f = new AsyncFib(--n); 351 p.linkSubtasks(r, f); 354 f.complete(); 370 FailingAsyncFib f = this; 371 int n = f.number; 373 FailingAsyncFib p = f; 375 f = new FailingAsyncFib(--n); [all …]
|
D | RecursiveActionTest.java | 219 FibAction f = new FibAction(8); in testInvoke() 220 assertNull(f.invoke()); in testInvoke() 221 assertEquals(21, f.result); in testInvoke() 222 checkCompletedNormally(f); in testInvoke() 235 FibAction f = new FibAction(8); in testQuietlyInvoke() 236 f.quietlyInvoke(); in testQuietlyInvoke() 237 assertEquals(21, f.result); in testQuietlyInvoke() 238 checkCompletedNormally(f); in testQuietlyInvoke() 249 FibAction f = new FibAction(8); in testForkJoin() 250 assertSame(f, f.fork()); in testForkJoin() [all …]
|
D | CountedCompleterTest.java | 537 CCF f = this; 540 new RCCF(f, n - 2).fork(); 541 f = new LCCF(f, --n); 543 f.complete(null); 588 FailingCCF f = this; 591 new RFCCF(f, n - 2).fork(); 592 f = new LFCCF(f, --n); 594 f.complete(null); 631 CCF f = new LCCF(8); in testInvoke() 632 assertNull(f.invoke()); in testInvoke() [all …]
|
D | RecursiveTaskTest.java | 236 FibTask f = new FibTask(8); in testInvoke() 237 Integer r = f.invoke(); in testInvoke() 239 checkCompletedNormally(f, r); in testInvoke() 253 FibTask f = new FibTask(8); in testQuietlyInvoke() 254 f.quietlyInvoke(); in testQuietlyInvoke() 255 checkCompletedNormally(f, 21); in testQuietlyInvoke() 267 FibTask f = new FibTask(8); in testForkJoin() 268 assertSame(f, f.fork()); in testForkJoin() 269 Integer r = f.join(); in testForkJoin() 271 checkCompletedNormally(f, r); in testForkJoin() [all …]
|
D | CompletableFutureTest.java | 64 void checkIncomplete(CompletableFuture<?> f) { in checkIncomplete() argument 65 assertFalse(f.isDone()); in checkIncomplete() 66 assertFalse(f.isCancelled()); in checkIncomplete() 67 assertTrue(f.toString().contains("Not completed")); in checkIncomplete() 69 assertNull(f.getNow(null)); in checkIncomplete() 72 f.get(0L, SECONDS); in checkIncomplete() 79 <T> void checkCompletedNormally(CompletableFuture<T> f, T value) { in checkCompletedNormally() argument 80 checkTimedGet(f, value); in checkCompletedNormally() 83 assertEquals(value, f.join()); in checkCompletedNormally() 86 assertEquals(value, f.getNow(null)); in checkCompletedNormally() [all …]
|
D | ForkJoinTask8Test.java | 315 AsyncFib f = this; 316 int n = f.number; 318 AsyncFib p = f; 320 f = new AsyncFib(--n); 321 p.linkSubtasks(r, f); 324 f.complete(); 353 FailingAsyncFib f = this; 354 int n = f.number; 356 FailingAsyncFib p = f; 358 f = new FailingAsyncFib(--n); [all …]
|
D | ThreadLocalRandomTest.java | 63 int f = ThreadLocalRandom.current().nextInt(); in testNextInt() local 65 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) in testNextInt() 74 long f = ThreadLocalRandom.current().nextLong(); 76 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f) 85 boolean f = ThreadLocalRandom.current().nextBoolean(); 87 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f) 96 float f = ThreadLocalRandom.current().nextFloat(); 98 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f) 107 double f = ThreadLocalRandom.current().nextDouble(); 109 while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f) [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | FormatterTest.java | 162 Formatter f = new Formatter(); in test_Constructor() local 163 assertNotNull(f); in test_Constructor() 164 assertTrue(f.out() instanceof StringBuilder); in test_Constructor() 165 assertEquals(f.locale(), Locale.getDefault()); in test_Constructor() 166 assertNotNull(f.toString()); in test_Constructor() 228 Formatter f = null; in test_ConstructorLjava_lang_String() local 230 f = new Formatter((String) null); in test_ConstructorLjava_lang_String() 236 f = new Formatter(notExist.getPath()); in test_ConstructorLjava_lang_String() 237 assertEquals(f.locale(), Locale.getDefault()); in test_ConstructorLjava_lang_String() 238 f.close(); in test_ConstructorLjava_lang_String() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | FieldTest.java | 163 Field f = null; in test_equalsLjava_lang_Object() local 165 f = TestField.class.getDeclaredField("shortField"); in test_equalsLjava_lang_Object() 170 assertTrue("Same Field returned false", f.equals(f)); in test_equalsLjava_lang_Object() 171 assertTrue("Inherited Field returned false", f.equals(TestField.class in test_equalsLjava_lang_Object() 173 assertTrue("Identical Field from different class returned true", !f in test_equalsLjava_lang_Object() 187 Field f = TestField.class.getDeclaredField("doubleField"); in test_getLjava_lang_Object() local 188 Double val = (Double) f.get(x); in test_getLjava_lang_Object() 193 f = TestField.class.getDeclaredField("doubleSField"); in test_getLjava_lang_Object() 194 f.set(x, new Double(1.0)); in test_getLjava_lang_Object() 195 val = (Double) f.get(x); in test_getLjava_lang_Object() [all …]
|
/libcore/luni/src/test/java/libcore/java/security/cert/ |
D | X509CertificateTest.java | 139 private final X509Certificate getCertificate(CertificateFactory f, String name) in getCertificate() argument 144 return (X509Certificate) f.generateCertificate(is); in getCertificate() 153 …private final Collection<? extends X509Certificate> getCertificates(CertificateFactory f, String n… in getCertificates() argument 158 return (Collection<? extends X509Certificate>) f.generateCertificates(is); in getCertificates() 262 CertificateFactory f = CertificateFactory.getInstance("X.509", p); in test_Provider() local 263 getPublicKey(f); in test_Provider() 264 getType(f); in test_Provider() 265 check_equals(f); in test_Provider() 266 check_toString(f); in test_Provider() 267 check_hashCode(f); in test_Provider() [all …]
|
D | X509CRLTest.java | 96 private final X509Certificate getCertificate(CertificateFactory f, String name) in getCertificate() argument 101 X509Certificate c = (X509Certificate) f.generateCertificate(is); in getCertificate() 112 private final X509CRL getCRL(CertificateFactory f, String name) throws Exception { in getCRL() argument 116 X509CRL crl = (X509CRL) f.generateCRL(is); in getCRL() 169 CertificateFactory f = CertificateFactory.getInstance("X.509"); in test_X509CRLImpl_verify() local 170 X509CRL crlRsa = getCRL(f, CRL_RSA); in test_X509CRLImpl_verify() 172 X509Certificate caCert = getCertificate(f, CERT_CRL_CA); in test_X509CRLImpl_verify() 173 interned.verify(caCert.getPublicKey(), f.getProvider()); in test_X509CRLImpl_verify() 182 CertificateFactory f = CertificateFactory.getInstance("X.509", p); in test_Provider() local 183 isRevoked(f); in test_Provider() [all …]
|
/libcore/luni/src/test/java/tests/security/spec/ |
D | EllipticCurveTest.java | 44 ECFieldFp f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() local 49 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() 60 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() 65 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01() 78 ECFieldFp f = null; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() local 85 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 90 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 96 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 101 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() 107 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | UnixFileSystem.java | 130 public boolean isAbsolute(File f) { in isAbsolute() argument 131 return (f.getPrefixLength() != 0); in isAbsolute() 134 public String resolve(File f) { in resolve() argument 135 if (isAbsolute(f)) return f.getPath(); in resolve() 136 return resolve(System.getProperty("user.dir"), f.getPath()); in resolve() 189 File f = new File(res); in canonicalize() local 190 if (f.exists() && !f.isDirectory()) { in canonicalize() 248 public int getBooleanAttributes(File f) { in getBooleanAttributes() argument 251 BlockGuard.getVmPolicy().onPathAccess(f.getPath()); in getBooleanAttributes() 254 int rv = getBooleanAttributes0(f.getPath()); in getBooleanAttributes() [all …]
|
D | FileSystem.java | 89 public abstract boolean isAbsolute(File f); in isAbsolute() argument 95 public abstract String resolve(File f); in resolve() argument 113 public abstract int getBooleanAttributes(File f); in getBooleanAttributes() argument 127 public abstract boolean checkAccess(File f, int access); in checkAccess() argument 133 public abstract boolean setPermission(File f, int access, boolean enable, boolean owneronly); in setPermission() argument 140 public abstract long getLastModifiedTime(File f); in getLastModifiedTime() argument 147 public abstract long getLength(File f); in getLength() argument 165 public abstract boolean delete(File f); in delete() argument 172 public abstract String[] list(File f); in list() argument 178 public abstract boolean createDirectory(File f); in createDirectory() argument [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | FileTest.java | 61 File f = base; in createDeepStructure() local 62 for (int i = 0; f.toString().length() <= 1024; ++i) { in createDeepStructure() 63 f = new File(f, longString); in createDeepStructure() 64 assertTrue(f.mkdir()); in createDeepStructure() 66 return f; in createDeepStructure() 100 File f = new File(""); in test_emptyFilename() local 102 assertFalse(f.canExecute()); in test_emptyFilename() 103 assertFalse(f.canRead()); in test_emptyFilename() 104 assertFalse(f.canWrite()); in test_emptyFilename() 106 f.createNewFile(); in test_emptyFilename() [all …]
|
D | OldFileTest.java | 39 File f = new File(tempDir, files[i]); 40 if (f.isDirectory()) { 42 deleteTempFolder(f); 52 File f = new File(dir, files[i]); in deleteTempFolder() local 53 if (f.isDirectory()) in deleteTempFolder() 54 deleteTempFolder(f); in deleteTempFolder() 56 f.delete(); in deleteTempFolder() 67 File f = new File(d, "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String() local 74 assertEquals(tmpDirName, f.getPath()); in test_ConstructorLjava_io_FileLjava_lang_String() 78 f = new File(d, fileName); in test_ConstructorLjava_io_FileLjava_lang_String() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | FpUtils.java | 148 public static int getExponent(float f){ in getExponent() argument 149 return Math.getExponent(f); in getExponent() 223 public static boolean isFinite(float f) { in isFinite() argument 224 return Float.isFinite(f); in isFinite() 255 public static boolean isInfinite(float f) { in isInfinite() argument 256 return Float.isInfinite(f); in isInfinite() 287 public static boolean isNaN(float f) { in isNaN() argument 288 return Float.isNaN(f); in isNaN() 411 public static int ilogb(float f) { in ilogb() argument 412 int exponent = getExponent(f); in ilogb() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | FileTest.java | 45 File f = new File(dir, files[i]); in deleteTempFolder() local 46 if (f.isDirectory()) { in deleteTempFolder() 47 deleteTempFolder(f); in deleteTempFolder() 49 f.delete(); in deleteTempFolder() 87 File f = new File(tempDirectory.getPath(), "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String0() local 88 …s("Created Incorrect File ", addTrailingSlash(tempDirectory.getPath()) + "input.tst", f.getPath()); in test_ConstructorLjava_io_FileLjava_lang_String0() 100 File f = new File((File) null, "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String2() local 103 f.getAbsolutePath()); in test_ConstructorLjava_io_FileLjava_lang_String2() 108 File f = new File("/abc"); in test_ConstructorLjava_io_FileLjava_lang_String3() local 111 d.getAbsolutePath(), f.getAbsolutePath()); in test_ConstructorLjava_io_FileLjava_lang_String3() [all …]
|
D | FileWriterTest.java | 34 private File f; field in FileWriterTest 42 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_io_File() 45 bw = new BufferedWriter(new FileWriter(f)); in test_ConstructorLjava_io_File() 48 br = new BufferedReader(new FileReader(f.getPath())); in test_ConstructorLjava_io_File() 60 FileWriter fileWriter = new FileWriter(f); in test_ConstructorLjava_io_FileZ() 66 fileWriter = new FileWriter(f, true); in test_ConstructorLjava_io_FileZ() 71 FileReader fileReader = new FileReader(f); in test_ConstructorLjava_io_FileZ() 77 fileWriter = new FileWriter(f); in test_ConstructorLjava_io_FileZ() 82 fileWriter = new FileWriter(f, false); in test_ConstructorLjava_io_FileZ() 87 fileReader = new FileReader(f); in test_ConstructorLjava_io_FileZ() [all …]
|
/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | BlockGuardTest.java | 54 File f = File.createTempFile("foo", "bar"); in testFile() local 57 f.getAbsolutePath(); in testFile() 58 f.getParentFile(); in testFile() 59 f.getName(); in testFile() 60 f.getParent(); in testFile() 61 f.getPath(); in testFile() 62 f.isAbsolute(); in testFile() 65 f.mkdir(); in testFile() 68 f.listFiles(); in testFile() 71 f.list(); in testFile() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | FormatterBenchmark.java | 28 Formatter f = new Formatter(); in timeFormatter_NoFormatting() local 29 f.format("this is a reasonably short string that doesn't actually need any formatting"); in timeFormatter_NoFormatting() 43 Formatter f = new Formatter(); in timeFormatter_OneInt() local 44 f.format("this is a reasonably short string that has an int %d in it", value); in timeFormatter_OneInt() 52 Formatter f = new Formatter(); in timeFormatter_OneIntArabic() local 53 f.format(arabic, "this is a reasonably short string that has an int %d in it", value); in timeFormatter_OneIntArabic() 69 Formatter f = new Formatter(); in timeFormatter_OneHexInt() local 70 f.format("this is a reasonably short string that has an int %x in it", value); in timeFormatter_OneHexInt() 86 Formatter f = new Formatter(); in timeFormatter_OneFloat() local 87 f.format("this is a reasonably short string that has a float %f in it", value); in timeFormatter_OneFloat() [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | FlagOpTest.java | 84 for (StreamOpFlag f : EnumSet.allOf(StreamOpFlag.class)) { in testFlagsClearAllSet() 85 if (f.isStreamFlag()) { in testFlagsClearAllSet() 86 clearAllFlags |= f.clear(); in testFlagsClearAllSet() 95 for (StreamOpFlag f : StreamOpFlagTestHelper.allStreamFlags()) { in testFlagsClearAllSet() 96 if (f.canSet(StreamOpFlag.Type.OP)) { in testFlagsClearAllSet() 97 ops.add(new TestFlagExpectedOp<>(f.set(), in testFlagsClearAllSet() 101 known.add(f); in testFlagsClearAllSet() 102 notKnown.remove(f); in testFlagsClearAllSet() 122 for (StreamOpFlag f : EnumSet.allOf(StreamOpFlag.class)) { in testFlagsSetAllClear() 123 if (f.isStreamFlag()) { in testFlagsSetAllClear() [all …]
|
/libcore/luni/src/main/native/ |
D | java_lang_StringToReal.cpp | 82 static jdouble createDouble1 (JNIEnv* env, uint64_t * f, int32_t length, jint e); 83 static jdouble doubleAlgorithm (JNIEnv* env, uint64_t * f, int32_t length, jint e, 97 uint64_t* f; in createDouble() local 106 f = def; in createDouble() 108 *f = 0; in createDouble() 118 memcpy (fNoOverflow, f, sizeof (uint64_t) * index); in createDouble() 120 simpleAppendDecimalDigitHighPrecision (f, index, *s - '0'); in createDouble() 123 f[index++] = overflow; in createDouble() 132 memcpy (f, fNoOverflow, sizeof (uint64_t) * index); in createDouble() 164 result = toDoubleHighPrecision (f, index); in createDouble() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeFormatterBuilder.java | 109 DateTimeFormatter f = builder.toFormatter(); in test_toFormatter_empty() local 110 assertEquals(f.toString(), ""); in test_toFormatter_empty() 117 DateTimeFormatter f = builder.toFormatter(); in test_parseCaseSensitive() local 118 assertEquals(f.toString(), "ParseCaseSensitive(true)"); in test_parseCaseSensitive() 124 DateTimeFormatter f = builder.toFormatter(); in test_parseCaseInsensitive() local 125 assertEquals(f.toString(), "ParseCaseSensitive(false)"); in test_parseCaseInsensitive() 132 DateTimeFormatter f = builder.toFormatter(); in test_parseStrict() local 133 assertEquals(f.toString(), "ParseStrict(true)"); in test_parseStrict() 139 DateTimeFormatter f = builder.toFormatter(); in test_parseLenient() local 140 assertEquals(f.toString(), "ParseStrict(false)"); in test_parseLenient() [all …]
|