Home
last modified time | relevance | path

Searched refs:t (Results 1 – 25 of 388) sorted by relevance

12345678910>>...16

/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java42 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 …]
DLockSupportTest.java118 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 …]
DCountDownLatchTest.java68 Thread t = newStartedThread(new CheckedRunnable() { in testAwait() local
80 assertThreadStaysAlive(t); in testAwait()
83 awaitTermination(t); in testAwait()
93 Thread t = newStartedThread(new CheckedRunnable() { in testTimedAwait() local
105 assertThreadStaysAlive(t); in testTimedAwait()
108 awaitTermination(t); in testTimedAwait()
117 Thread t = newStartedThread(new CheckedRunnable() { in testAwait_Interruptible() local
137 assertThreadStaysAlive(t); in testAwait_Interruptible()
138 t.interrupt(); in testAwait_Interruptible()
139 awaitTermination(t); in testAwait_Interruptible()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTimerTest.java59 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 …]
DTimerTaskTest.java79 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/
DTimeUnitTest.java66 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 …]
DLockSupportTest.java142 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 …]
DCountDownLatchTest.java91 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/
DTestLocalDateTime.java126 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 …]
DTestDuration.java84 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 …]
DTestLocalDate.java122 LocalDate t = TEST_2007_07_15.with(YEAR, 2007); in test_with_DateTimeField_long_noChange_same() local
123 assertSame(t, TEST_2007_07_15); in test_with_DateTimeField_long_noChange_same()
128 LocalDate t = TEST_2007_07_15.withYear(2007); in test_withYear_int_noChange_same() local
129 assertSame(t, TEST_2007_07_15); in test_withYear_int_noChange_same()
134 LocalDate t = TEST_2007_07_15.withMonth(7); in test_withMonth_int_noChange_same() local
135 assertSame(t, TEST_2007_07_15); in test_withMonth_int_noChange_same()
140 LocalDate t = TEST_2007_07_15.withDayOfMonth(15); in test_withDayOfMonth_noChange_same() local
141 assertSame(t, TEST_2007_07_15); in test_withDayOfMonth_noChange_same()
146 LocalDate t = TEST_2007_07_15.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15); in test_withDayOfYear_noChange_same() local
147 assertSame(t, TEST_2007_07_15); in test_withDayOfYear_noChange_same()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DIntegerBenchmark.java21 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/main/java/java/util/
DArrayPrefixHelpers.java142 CumulateTask<T> t = this; in compute() local
143 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute()
145 CumulateTask<T> lt = t.left, rt = t.right, f; in compute()
148 f = rt = t.right = in compute()
149 new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h); in compute()
150 t = lt = t.left = in compute()
151 new CumulateTask<T>(t, fn, a, org, fnc, th, l, mid); in compute()
154 T pin = t.in; in compute()
156 f = t = null; in compute()
165 t = rt; in compute()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKDuration.java124 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 …]
DTCKLocalDateTime.java870 LocalDateTime t = LocalDateTime.parse(text);
871 assertEquals(t.getYear(), y);
872 assertEquals(t.getMonth().getValue(), month);
873 assertEquals(t.getDayOfMonth(), d);
874 assertEquals(t.getHour(), h);
875 assertEquals(t.getMinute(), m);
876 assertEquals(t.getSecond(), s);
877 assertEquals(t.getNano(), n);
1194 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2008);
1195 check(t, 2008, 7, 15, 12, 30, 40, 987654321);
[all …]
DTCKLocalTime.java521 LocalTime t = LocalTime.parse(parsable); in factory_parse_validText() local
522 assertNotNull(t, parsable); in factory_parse_validText()
523 assertEquals(t.getHour(), h); in factory_parse_validText()
524 assertEquals(t.getMinute(), m); in factory_parse_validText()
525 assertEquals(t.getSecond(), s); in factory_parse_validText()
526 assertEquals(t.getNano(), n); in factory_parse_validText()
1149 LocalTime t = TEST_12_30_40_987654321; in test_withHour_normal() local
1151 t = t.withHour(i); in test_withHour_normal()
1152 assertEquals(t.getHour(), i); in test_withHour_normal()
1158 LocalTime t = TEST_12_30_40_987654321.withHour(12); in test_withHour_noChange_equal() local
[all …]
DTCKLocalDate.java539 LocalDate t = LocalDate.parse(parsable);
540 assertNotNull(t, parsable);
541 assertEquals(t.getYear(), y, parsable);
542 assertEquals(t.getMonth().getValue(), m, parsable);
543 assertEquals(t.getDayOfMonth(), d, parsable);
862 LocalDate t = TEST_2007_07_15.with(YEAR, 2008);
863 assertEquals(t, LocalDate.of(2008, 7, 15));
891 LocalDate t = TEST_2007_07_15.withYear(2008);
892 assertEquals(t, LocalDate.of(2008, 7, 15));
902 LocalDate t = LocalDate.of(2008, 2, 29).withYear(2007);
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DLockSupport.java138 private static void setBlocker(Thread t, Object arg) { in setBlocker() argument
140 U.putObject(t, PARKBLOCKER, arg); in setBlocker()
188 Thread t = Thread.currentThread(); in park() local
189 setBlocker(t, blocker); in park()
191 setBlocker(t, null); in park()
228 Thread t = Thread.currentThread(); in parkNanos() local
229 setBlocker(t, blocker); in parkNanos()
231 setBlocker(t, null); in parkNanos()
269 Thread t = Thread.currentThread(); in parkUntil() local
270 setBlocker(t, blocker); in parkUntil()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DForkJoinTask.java381 int s; Thread t; ForkJoinWorkerThread wt; ForkJoinPool.WorkQueue w; in doJoin() local
383 ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ? in doJoin()
384 (w = (wt = (ForkJoinWorkerThread)t).workQueue). in doJoin()
396 int s; Thread t; ForkJoinWorkerThread wt; in doInvoke() local
398 ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ? in doInvoke()
399 (wt = (ForkJoinWorkerThread)t).pool. in doInvoke()
464 ExceptionNode[] t = exceptionTable; in recordExceptionalCompletion() local
465 int i = h & (t.length - 1); in recordExceptionalCompletion()
466 for (ExceptionNode e = t[i]; ; e = e.next) { in recordExceptionalCompletion()
468 t[i] = new ExceptionNode(this, ex, t[i], in recordExceptionalCompletion()
[all …]
/libcore/ojluni/src/main/java/java/util/function/
DPredicate.java49 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()
DBiPredicate.java53 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()
/libcore/ojluni/src/main/java/java/util/stream/
DStreamOpFlag.java385 private static MaskBuilder set(Type t) { in set() argument
386 return new MaskBuilder(new EnumMap<>(Type.class)).set(t); in set()
396 MaskBuilder mask(Type t, Integer i) { in mask() argument
397 map.put(t, i); in mask()
401 MaskBuilder set(Type t) { in set() argument
402 return mask(t, SET_BITS); in set()
405 MaskBuilder clear(Type t) { in clear() argument
406 return mask(t, CLEAR_BITS); in clear()
409 MaskBuilder setAndClear(Type t) { in setAndClear() argument
410 return mask(t, PRESERVE_BITS); in setAndClear()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DFormattedFloatingDecimal.java175 int t = Math.min(nDigits - exp, precision); in fillCompatible() local
176 mantissa = create(isNegative, exp + 1 + t); in fillCompatible()
179 System.arraycopy(digits, exp, mantissa, startIndex+exp+1, t); in fillCompatible()
188 int t = Math.max(0, Math.min(nDigits, precision + exp)); in fillCompatible() local
191 mantissa = create(isNegative, zeros + 2 + t); in fillCompatible()
195 if (t > 0) { in fillCompatible()
197 System.arraycopy(digits, 0, mantissa, startIndex + 2 + zeros, t); in fillCompatible()
199 } else if (t > 0) { in fillCompatible()
200 mantissa = create(isNegative, zeros + 2 + t); in fillCompatible()
204 System.arraycopy(digits, 0, mantissa, startIndex + 2, t); in fillCompatible()
[all …]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DAbstractQueuedSynchronizerTest.java71 } catch (Throwable t) { in testDefaultIsHeldExclusivelyFails()
72 fail("Unexpected exception: " + t.getMessage()); in testDefaultIsHeldExclusivelyFails()
83 } catch (Throwable t) { in testDefaultTryAcquireFails()
84 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryAcquireFails()
95 } catch (Throwable t) { in testDefaultTryAcquireSharedFails()
96 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryAcquireSharedFails()
107 } catch (Throwable t) { in testDefaultTryReleaseFails()
108 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryReleaseFails()
119 } catch (Throwable t) { in testDefaultTryReleaseSharedFails()
120 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryReleaseSharedFails()
DAbstractQueuedLongSynchronizerTest.java71 } catch (Throwable t) { in testDefaultIsHeldExclusivelyFails()
72 fail("Unexpected exception: " + t.getMessage()); in testDefaultIsHeldExclusivelyFails()
83 } catch (Throwable t) { in testDefaultTryAcquireFails()
84 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryAcquireFails()
95 } catch (Throwable t) { in testDefaultTryAcquireSharedFails()
96 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryAcquireSharedFails()
107 } catch (Throwable t) { in testDefaultTryReleaseFails()
108 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryReleaseFails()
119 } catch (Throwable t) { in testDefaultTryReleaseSharedFails()
120 fail("Unexpected exception: " + t.getMessage()); in testDefaultTryReleaseSharedFails()

12345678910>>...16