/libcore/jsr166-tests/src/test/java/jsr166/ |
D | TimeUnitTest.java | 42 for (long t = 0; t < 88888; ++t) { in testConvert() 43 assertEquals(t*60*60*24, in testConvert() 44 SECONDS.convert(t, DAYS)); in testConvert() 45 assertEquals(t*60*60, in testConvert() 46 SECONDS.convert(t, HOURS)); in testConvert() 47 assertEquals(t*60, in testConvert() 48 SECONDS.convert(t, MINUTES)); in testConvert() 49 assertEquals(t, in testConvert() 50 SECONDS.convert(t, SECONDS)); in testConvert() 51 assertEquals(t, in testConvert() [all …]
|
D | LockSupportTest.java | 118 Thread t = newStartedThread(new CheckedRunnable() { in testParkBeforeUnpark() local 125 LockSupport.unpark(t); in testParkBeforeUnpark() 126 awaitTermination(t); in testParkBeforeUnpark() 153 Thread t = newStartedThread(new CheckedRunnable() { in testParkAfterUnpark() local 162 LockSupport.unpark(t); in testParkAfterUnpark() 164 awaitTermination(t); in testParkAfterUnpark() 190 Thread t = newStartedThread(new CheckedRunnable() { in testParkBeforeInterrupt() local 200 assertThreadStaysAlive(t); in testParkBeforeInterrupt() 201 t.interrupt(); in testParkBeforeInterrupt() 202 awaitTermination(t); in testParkBeforeInterrupt() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimerTest.java | 59 public TimerTestTask(Timer t) { in TimerTestTask() argument 60 timer = t; in TimerTestTask() 112 Timer t = null; in test_ConstructorZ() local 115 t = new Timer(true); in test_ConstructorZ() 117 t.schedule(testTask, 200); in test_ConstructorZ() 119 t.cancel(); in test_ConstructorZ() 121 if (t != null) in test_ConstructorZ() 122 t.cancel(); in test_ConstructorZ() 131 Timer t = null; in test_Constructor() local 134 t = new Timer(); in test_Constructor() [all …]
|
D | TimerTaskTest.java | 79 Timer t = null; in test_cancel() local 87 t = new Timer(); in test_cancel() 89 t.schedule(testTask, 500); in test_cancel() 91 t.cancel(); in test_cancel() 94 t = new Timer(); in test_cancel() 96 t.schedule(testTask, 50); in test_cancel() 109 t.cancel(); in test_cancel() 113 t = new Timer(); in test_cancel() 115 t.schedule(testTask, 500, 500); // should never run in test_cancel() 119 t.cancel(); in test_cancel() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | TimeUnitTest.java | 66 for (long t = 0; t < 88888; ++t) { in testConvert() 67 assertEquals(t*60*60*24, in testConvert() 68 SECONDS.convert(t, DAYS)); in testConvert() 69 assertEquals(t*60*60, in testConvert() 70 SECONDS.convert(t, HOURS)); in testConvert() 71 assertEquals(t*60, in testConvert() 72 SECONDS.convert(t, MINUTES)); in testConvert() 73 assertEquals(t, in testConvert() 74 SECONDS.convert(t, SECONDS)); in testConvert() 75 assertEquals(t, in testConvert() [all …]
|
D | LockSupportTest.java | 142 Thread t = newStartedThread(new CheckedRunnable() { in testParkBeforeUnpark() local 149 LockSupport.unpark(t); in testParkBeforeUnpark() 150 awaitTermination(t); in testParkBeforeUnpark() 177 Thread t = newStartedThread(new CheckedRunnable() { in testParkAfterUnpark() local 186 LockSupport.unpark(t); in testParkAfterUnpark() 188 awaitTermination(t); in testParkAfterUnpark() 214 Thread t = newStartedThread(new CheckedRunnable() { in testParkBeforeInterrupt() local 224 assertThreadStaysAlive(t); in testParkBeforeInterrupt() 225 t.interrupt(); in testParkBeforeInterrupt() 226 awaitTermination(t); in testParkBeforeInterrupt() [all …]
|
D | CountDownLatchTest.java | 91 Thread t = newStartedThread(new CheckedRunnable() { in testAwait() local 103 assertThreadStaysAlive(t); in testAwait() 106 awaitTermination(t); in testAwait() 116 Thread t = newStartedThread(new CheckedRunnable() { in testTimedAwait() local 128 assertThreadStaysAlive(t); in testTimedAwait() 131 awaitTermination(t); in testTimedAwait() 140 Thread t = newStartedThread(new CheckedRunnable() { in testAwait_Interruptible() local 160 assertThreadStaysAlive(t); in testAwait_Interruptible() 161 t.interrupt(); in testAwait_Interruptible() 162 awaitTermination(t); in testAwait_Interruptible() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDateTime.java | 126 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2007); in test_withYear_int_noChange() local 127 assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate()); in test_withYear_int_noChange() 128 assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); in test_withYear_int_noChange() 133 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(7); in test_withMonth_int_noChange() local 134 assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate()); in test_withMonth_int_noChange() 135 assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); in test_withMonth_int_noChange() 140 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(15); in test_withDayOfMonth_noChange() local 141 assertSame(t, TEST_2007_07_15_12_30_40_987654321); in test_withDayOfMonth_noChange() 146 …LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 1… in test_withDayOfYear_noChange() local 147 assertSame(t, TEST_2007_07_15_12_30_40_987654321); in test_withDayOfYear_noChange() [all …]
|
D | TestDuration.java | 84 Duration t = Duration.ofSeconds(-1); in plus_zeroReturnsThis() local 85 assertSame(t.plus(Duration.ZERO), t); in plus_zeroReturnsThis() local 90 Duration t = Duration.ofSeconds(-1); in plus_zeroSingleton() local 91 assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO); in plus_zeroSingleton() 96 Duration t = Duration.ofSeconds(-1); in plusSeconds_zeroReturnsThis() local 97 assertSame(t.plusSeconds(0), t); in plusSeconds_zeroReturnsThis() 102 Duration t = Duration.ofSeconds(-1); in plusSeconds_zeroSingleton() local 103 assertSame(t.plusSeconds(1), Duration.ZERO); in plusSeconds_zeroSingleton() 108 Duration t = Duration.ofSeconds(-1, 2000000); in plusMillis_zeroReturnsThis() local 109 assertSame(t.plusMillis(0), t); in plusMillis_zeroReturnsThis() [all …]
|
D | TestLocalDate.java | 123 LocalDate t = TEST_2007_07_15.with(YEAR, 2007); in test_with_DateTimeField_long_noChange_same() local 124 assertSame(t, TEST_2007_07_15); in test_with_DateTimeField_long_noChange_same() 129 LocalDate t = TEST_2007_07_15.withYear(2007); in test_withYear_int_noChange_same() local 130 assertSame(t, TEST_2007_07_15); in test_withYear_int_noChange_same() 135 LocalDate t = TEST_2007_07_15.withMonth(7); in test_withMonth_int_noChange_same() local 136 assertSame(t, TEST_2007_07_15); in test_withMonth_int_noChange_same() 141 LocalDate t = TEST_2007_07_15.withDayOfMonth(15); in test_withDayOfMonth_noChange_same() local 142 assertSame(t, TEST_2007_07_15); in test_withDayOfMonth_noChange_same() 147 LocalDate t = TEST_2007_07_15.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15); in test_withDayOfYear_noChange_same() local 148 assertSame(t, TEST_2007_07_15); in test_withDayOfYear_noChange_same() [all …]
|
/libcore/ojluni/src/test/java/util/Timer/ |
D | Args.java | 39 void schedule(final Timer t, final TimerTask task, final Date d) { in schedule() argument 40 t.schedule(task, d); in schedule() 43 () -> t.schedule(task, d)); in schedule() 46 void schedule(final Timer t, final TimerTask task, final Date d, final in schedule() argument 48 t.schedule(task, d, period); in schedule() 51 () -> t.schedule(task, d, period)); in schedule() 54 void scheduleAtFixedRate(final Timer t, final TimerTask task, final in scheduleAtFixedRate() argument 56 t.scheduleAtFixedRate(task, d, period); in scheduleAtFixedRate() 59 () -> t.scheduleAtFixedRate(task, d, period)); in scheduleAtFixedRate() 76 final Timer t = new Timer(); [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | IntegerBenchmark.java | 21 int t = 0; in timeLongSignumBranch() local 23 t += signum1(-i); in timeLongSignumBranch() 24 t += signum1(0); in timeLongSignumBranch() 25 t += signum1(i); in timeLongSignumBranch() 27 return t; in timeLongSignumBranch() 31 int t = 0; in timeLongSignumBranchFree() local 33 t += signum2(-i); in timeLongSignumBranchFree() 34 t += signum2(0); in timeLongSignumBranchFree() 35 t += signum2(i); in timeLongSignumBranchFree() 37 return t; in timeLongSignumBranchFree() [all …]
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | FdlibmTranslit.java | 94 double r, s, t = 0.0, w; in compute() local 110 t = __HI(t, 0x43500000); // set t= 2**54 in compute() 111 t *= x; in compute() 112 t = __HI(t, __HI(t) / 3 + B2); in compute() 114 t = __HI(t, hx / 3 + B1); in compute() 118 r = t * t / x; in compute() 119 s = C + r * t; in compute() 120 t *= G + F / (s + E + D / s); in compute() 123 t = __LO(t, 0); in compute() 124 t = __HI(t, __HI(t) + 0x00000001); in compute() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | ArrayPrefixHelpers.java | 147 CumulateTask<T> t = this; in compute() local 148 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute() 150 CumulateTask<T> lt = t.left, rt = t.right, f; in compute() 153 f = rt = t.right = in compute() 154 new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h); in compute() 155 t = lt = t.left = in compute() 156 new CumulateTask<T>(t, fn, a, org, fnc, th, l, mid); in compute() 159 T pin = t.in; in compute() 161 f = t = null; in compute() 170 t = rt; in compute() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKDuration.java | 124 Duration t = Duration.ofSeconds(i); in factory_seconds_long() local 125 assertEquals(t.getSeconds(), i); in factory_seconds_long() 126 assertEquals(t.getNano(), 0); in factory_seconds_long() 137 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local 138 assertEquals(t.getSeconds(), i); in factory_seconds_long_long() 139 assertEquals(t.getNano(), j); in factory_seconds_long_long() 142 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local 143 assertEquals(t.getSeconds(), i - 1); in factory_seconds_long_long() 144 assertEquals(t.getNano(), j + 1000000000); in factory_seconds_long_long() 147 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local [all …]
|
D | TCKLocalDateTime.java | 864 LocalDateTime t = LocalDateTime.parse(text); 865 assertEquals(t.getYear(), y); 866 assertEquals(t.getMonth().getValue(), month); 867 assertEquals(t.getDayOfMonth(), d); 868 assertEquals(t.getHour(), h); 869 assertEquals(t.getMinute(), m); 870 assertEquals(t.getSecond(), s); 871 assertEquals(t.getNano(), n); 1188 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2008); 1189 check(t, 2008, 7, 15, 12, 30, 40, 987654321); [all …]
|
D | TCKLocalTime.java | 515 LocalTime t = LocalTime.parse(parsable); in factory_parse_validText() local 516 assertNotNull(t, parsable); in factory_parse_validText() 517 assertEquals(t.getHour(), h); in factory_parse_validText() 518 assertEquals(t.getMinute(), m); in factory_parse_validText() 519 assertEquals(t.getSecond(), s); in factory_parse_validText() 520 assertEquals(t.getNano(), n); in factory_parse_validText() 1143 LocalTime t = TEST_12_30_40_987654321; in test_withHour_normal() local 1145 t = t.withHour(i); in test_withHour_normal() 1146 assertEquals(t.getHour(), i); in test_withHour_normal() 1152 LocalTime t = TEST_12_30_40_987654321.withHour(12); in test_withHour_noChange_equal() local [all …]
|
D | TCKLocalDate.java | 584 LocalDate t = LocalDate.parse(parsable); 585 assertNotNull(t, parsable); 586 assertEquals(t.getYear(), y, parsable); 587 assertEquals(t.getMonth().getValue(), m, parsable); 588 assertEquals(t.getDayOfMonth(), d, parsable); 907 LocalDate t = TEST_2007_07_15.with(YEAR, 2008); 908 assertEquals(t, LocalDate.of(2008, 7, 15)); 936 LocalDate t = TEST_2007_07_15.withYear(2008); 937 assertEquals(t, LocalDate.of(2008, 7, 15)); 947 LocalDate t = LocalDate.of(2008, 2, 29).withYear(2007); [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
D | LockSupport.java | 142 private static void setBlocker(Thread t, Object arg) { in setBlocker() argument 143 U.putReferenceOpaque(t, PARKBLOCKER, arg); in setBlocker() 209 Thread t = Thread.currentThread(); in park() local 210 setBlocker(t, blocker); in park() 212 setBlocker(t, null); in park() 250 Thread t = Thread.currentThread(); in parkNanos() local 251 setBlocker(t, blocker); in parkNanos() 253 setBlocker(t, null); in parkNanos() 291 Thread t = Thread.currentThread(); in parkUntil() local 292 setBlocker(t, blocker); in parkUntil() [all …]
|
/libcore/ojluni/src/test/java/lang/invoke/common/test/java/lang/invoke/lib/ |
D | CodeCacheOverflowProcessor.java | 45 public static Boolean isThrowableCausedByVME(Throwable t) { in isThrowableCausedByVME() argument 46 Throwable causeOfT = t; in isThrowableCausedByVME() 54 } while (causeOfT != null && causeOfT != t); in isThrowableCausedByVME() 72 Throwable t = filterException(test::run, in runMHTest() local 74 if (t != null) { in runMHTest() 78 return t; in runMHTest() 106 } catch (Throwable t) { in filterException() 107 if (filter.apply(t)) { in filterException() 108 return t; in filterException() 110 throw t; in filterException()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ForkJoinTask.java | 293 for (Thread t; a != null; a = a.next) { in signalWaiters() 294 if ((t = a.thread) != Thread.currentThread() && t != null) in signalWaiters() 295 LockSupport.unpark(t); // don't self-signal in signalWaiters() 402 ForkJoinPool p; boolean internal; int s; Thread t; in awaitDone() local 404 if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) { in awaitDone() 405 ForkJoinWorkerThread wt = (ForkJoinWorkerThread)t; in awaitDone() 526 static final void cancelIgnoringExceptions(Future<?> t) { in cancelIgnoringExceptions() argument 527 if (t != null) { in cancelIgnoringExceptions() 529 t.cancel(true); in cancelIgnoringExceptions() 628 void uncheckedThrow(Throwable t) throws T { in uncheckedThrow() argument [all …]
|
/libcore/luni/src/test/java/libcore/javax/xml/datatype/ |
D | DatatypeConfigurationExceptionTest.java | 44 Throwable t = new Throwable(); in constructorWithStringAndThrowable() local 45 DatatypeConfigurationException e = new DatatypeConfigurationException("message", t); in constructorWithStringAndThrowable() 47 assertEquals(t, e.getCause()); in constructorWithStringAndThrowable() 52 Throwable t = new Throwable(); in constructorWithThrowable() local 53 DatatypeConfigurationException e = new DatatypeConfigurationException(t); in constructorWithThrowable() 55 assertEquals(t, e.getCause()); in constructorWithThrowable() 60 Throwable t = new Throwable(); in testPrintStackTrace_noArgs() local 61 DatatypeConfigurationException e = new DatatypeConfigurationException(t); in testPrintStackTrace_noArgs() 67 Throwable t = new Throwable(); in testPrintStackTrace_withPrintStream() local 68 DatatypeConfigurationException e = new DatatypeConfigurationException(t); in testPrintStackTrace_withPrintStream() [all …]
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | BiPredicate.java | 53 boolean test(T t, U u); in test() argument 73 return (T t, U u) -> test(t, u) && other.test(t, u); in and() 84 return (T t, U u) -> !test(t, u); in negate() 105 return (T t, U u) -> test(t, u) || other.test(t, u); in or()
|
D | Predicate.java | 49 boolean test(T t); in test() argument 69 return (t) -> test(t) && other.test(t); in and() 80 return (t) -> !test(t); in negate() 101 return (t) -> test(t) || other.test(t); in or()
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | Fill.java | 46 catch (Throwable t) { unexpected(t); } in realMain() 53 catch (Throwable t) { unexpected(t); } in realMain() 60 catch (Throwable t) { unexpected(t); } in realMain() 68 static void unexpected(Throwable t) {failed++; t.printStackTrace();} in unexpected() argument 74 try {realMain(args);} catch (Throwable t) {unexpected(t);} in main()
|