Home
last modified time | relevance | path

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

12345678910>>...13

/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/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/luni/src/test/java/libcore/libcore/icu/
DTransliteratorTest.java29 Transliterator t = Transliterator.getInstance(id); in testAll() local
30 t.transliterate("hello"); in testAll()
36 Transliterator t = Transliterator.getInstance("Unknown"); in test_Unknown() local
44 Transliterator t = Transliterator.getInstance(null); in test_null_id() local
51 Transliterator t = Transliterator.getInstance("Any-Upper"); in test_Any_Upper() local
52 assertEquals("HELLO WORLD!", t.transliterate("HeLlO WoRlD!")); in test_Any_Upper()
53 assertEquals("STRASSE", t.transliterate("Straße")); in test_Any_Upper()
57 Transliterator t = Transliterator.getInstance("Any-Lower"); in test_Any_Lower() local
58 assertEquals("hello world!", t.transliterate("HeLlO WoRlD!")); in test_Any_Lower()
65 Transliterator t = Transliterator.getInstance("Greek-Latin"); in test_Greek_Latin() local
[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/test/java/time/tck/java/time/
DTCKDuration.java122 Duration t = Duration.ofSeconds(i); in factory_seconds_long() local
123 assertEquals(t.getSeconds(), i); in factory_seconds_long()
124 assertEquals(t.getNano(), 0); in factory_seconds_long()
135 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local
136 assertEquals(t.getSeconds(), i); in factory_seconds_long_long()
137 assertEquals(t.getNano(), j); in factory_seconds_long_long()
140 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local
141 assertEquals(t.getSeconds(), i - 1); in factory_seconds_long_long()
142 assertEquals(t.getNano(), j + 1000000000); in factory_seconds_long_long()
145 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() local
[all …]
DTCKLocalTime.java487 LocalTime t = LocalTime.parse(parsable); in factory_parse_validText() local
488 assertNotNull(t, parsable); in factory_parse_validText()
489 assertEquals(t.getHour(), h); in factory_parse_validText()
490 assertEquals(t.getMinute(), m); in factory_parse_validText()
491 assertEquals(t.getSecond(), s); in factory_parse_validText()
492 assertEquals(t.getNano(), n); in factory_parse_validText()
1115 LocalTime t = TEST_12_30_40_987654321; in test_withHour_normal() local
1117 t = t.withHour(i); in test_withHour_normal()
1118 assertEquals(t.getHour(), i); in test_withHour_normal()
1124 LocalTime t = TEST_12_30_40_987654321.withHour(12); in test_withHour_noChange_equal() 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 …]
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/
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 …]
DDualPivotQuicksort.java129 int t = a[lo]; a[lo] = a[hi]; a[hi] = t; in sort() local
201 int[] t = a; a = b; b = t; in sort() local
296 if (a[e2] < a[e1]) { int t = a[e2]; a[e2] = a[e1]; a[e1] = t; } in sort() local
298 if (a[e3] < a[e2]) { int t = a[e3]; a[e3] = a[e2]; a[e2] = t; in sort() local
299 if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } in sort()
301 if (a[e4] < a[e3]) { int t = a[e4]; a[e4] = a[e3]; a[e3] = t; in sort() local
302 if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; in sort()
303 if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } in sort()
306 if (a[e5] < a[e4]) { int t = a[e5]; a[e5] = a[e4]; a[e4] = t; in sort() local
307 if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; in sort()
[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 …]
DConcurrentLinkedQueue.java253 Node<E> h = null, t = null; in ConcurrentLinkedQueue() local
257 h = t = newNode; in ConcurrentLinkedQueue()
259 lazySetNext(t, newNode); in ConcurrentLinkedQueue()
260 t = newNode; in ConcurrentLinkedQueue()
264 h = t = newNode(null); in ConcurrentLinkedQueue()
266 tail = t; in ConcurrentLinkedQueue()
313 for (Node<E> t = tail, p = t;;) { in offer()
321 if (p != t) // hop two nodes at a time in offer()
322 casTail(t, newNode); // Failure is OK. in offer()
332 p = (t != (t = tail)) ? t : head; in offer()
[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/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
DInvalidPreferencesFormatExceptionTest.java43 Throwable t = new Throwable("root"); in testInvalidPreferencesFormatExceptionStringThrowable() local
45 "msg", t); in testInvalidPreferencesFormatExceptionStringThrowable()
46 assertSame(t, e.getCause()); in testInvalidPreferencesFormatExceptionStringThrowable()
48 assertTrue(e.getMessage().indexOf(t.getClass().getName()) < 0); in testInvalidPreferencesFormatExceptionStringThrowable()
56 Throwable t = new Throwable("root");
58 t);
59 assertSame(t, e.getCause());
61 assertTrue(e.getMessage().indexOf(t.getClass().getName()) >= 0);
/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/ojluni/src/main/native/
DPollArrayWrapper.c46 struct timeval t; in ipoll() local
49 gettimeofday(&t, NULL); in ipoll()
50 start = t.tv_sec * 1000 + t.tv_usec / 1000; in ipoll()
56 gettimeofday(&t, NULL); in ipoll()
57 now = t.tv_sec * 1000 + t.tv_usec / 1000; in ipoll()

12345678910>>...13