/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDateTime.java | 63 import static org.testng.Assert.assertSame; 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() 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() 141 assertSame(t, TEST_2007_07_15_12_30_40_987654321); in test_withDayOfMonth_noChange() 147 assertSame(t, TEST_2007_07_15_12_30_40_987654321); in test_withDayOfYear_noChange() 153 assertSame(t, TEST_2007_07_15_12_30_40_987654321); in test_withHour_noChange() 159 assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); in test_withHour_toMidnight() 165 assertSame(t.toLocalTime(), LocalTime.NOON); in test_withHour_toMidday() [all …]
|
D | TestOffsetDateTime.java | 62 import static org.testng.Assert.assertSame; 114 assertSame(a.getOffset(), offset); in test_get_same() 115 assertSame(a.toLocalDate(), localDate); in test_get_same() 116 assertSame(a.toLocalTime(), localTime); in test_get_same() 117 assertSame(a.toLocalDateTime(), localDateTime); in test_get_same() 127 assertSame(test.toLocalDateTime(), base.toLocalDateTime()); in test_withOffsetSameLocal() 128 assertSame(test.getOffset(), OFFSET_PTWO); in test_withOffsetSameLocal() 135 assertSame(test, base); in test_withOffsetSameLocal_noChange() 142 assertSame(test, base); in test_withOffsetSameInstant_noChange() 149 assertSame(test, base); in test_withYear_noChange() [all …]
|
D | TestDuration.java | 63 import static org.testng.Assert.assertSame; 85 assertSame(t.plus(Duration.ZERO), t); in plus_zeroReturnsThis() 91 assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO); in plus_zeroSingleton() 97 assertSame(t.plusSeconds(0), t); in plusSeconds_zeroReturnsThis() 103 assertSame(t.plusSeconds(1), Duration.ZERO); in plusSeconds_zeroSingleton() 109 assertSame(t.plusMillis(0), t); in plusMillis_zeroReturnsThis() 115 assertSame(t.plusMillis(998), Duration.ZERO); in plusMillis_zeroSingleton() 121 assertSame(t.plusNanos(0), t); in plusNanos_zeroReturnsThis() 127 assertSame(t.plusNanos(998000000), Duration.ZERO); in plusNanos_zeroSingleton() 133 assertSame(t.minus(Duration.ZERO), t); in minus_zeroReturnsThis() [all …]
|
D | TestLocalTime.java | 63 import static org.testng.Assert.assertSame; 102 assertSame(LocalTime.MIDNIGHT, LocalTime.MIDNIGHT); in constant_MIDNIGHT_same() 103 assertSame(LocalTime.MIDNIGHT, LocalTime.of(0, 0)); in constant_MIDNIGHT_same() 113 assertSame(LocalTime.NOON, LocalTime.NOON); in constant_MIDDAY_same() 114 assertSame(LocalTime.NOON, LocalTime.of(12, 0)); in constant_MIDDAY_same() 125 assertSame(LocalTime.MIN, LocalTime.of(0, 0)); in constant_MIN_TIME_same() 135 assertSame(LocalTime.NOON, LocalTime.NOON); in constant_MAX_TIME_same() 136 assertSame(LocalTime.NOON, LocalTime.of(12, 0)); in constant_MAX_TIME_same() 144 assertSame(test1, test2); in factory_time_2ints_singletons() 153 assertSame(test1, test2); in factory_time_3ints_singletons() [all …]
|
D | TestPeriod.java | 63 import static org.testng.Assert.assertSame; 85 assertSame(Period.ZERO, Period.ZERO); in factory_zeroSingleton() 86 assertSame(Period.ofYears(0), Period.ZERO); in factory_zeroSingleton() 87 assertSame(Period.ofMonths(0), Period.ZERO); in factory_zeroSingleton() 88 assertSame(Period.ofDays(0), Period.ZERO); in factory_zeroSingleton() 89 assertSame(Period.of(0, 0, 0), Period.ZERO); in factory_zeroSingleton()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | RecursiveTaskTest.java | 96 assertSame(expected, a.getRawResult()); in checkCompletedNormally() 97 assertSame(expected, a.join()); in checkCompletedNormally() 101 assertSame(expected, a.get()); in checkCompletedNormally() 104 assertSame(expected, a.get(5L, SECONDS)); in checkCompletedNormally() 160 assertSame(t.getClass(), a.getException().getClass()); in checkCompletedAbnormally() 169 assertSame(t.getClass(), expected.getClass()); in checkCompletedAbnormally() 176 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 183 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 258 assertSame(NoResult, testInvokeOnPool(mainPool(), a)); in testQuietlyInvoke() 268 assertSame(f, f.fork()); in testForkJoin() [all …]
|
D | AtomicReferenceTest.java | 32 assertSame(one, ai.get()); in testConstructor() 48 assertSame(one, ai.get()); in testGetSet() 50 assertSame(two, ai.get()); in testGetSet() 52 assertSame(m3, ai.get()); in testGetSet() 60 assertSame(one, ai.get()); in testGetLazySet() 62 assertSame(two, ai.get()); in testGetLazySet() 64 assertSame(m3, ai.get()); in testGetLazySet() 74 assertSame(m4, ai.get()); in testCompareAndSet() 76 assertSame(m4, ai.get()); in testCompareAndSet() 78 assertSame(seven, ai.get()); in testCompareAndSet() [all …]
|
D | AtomicMarkableReferenceTest.java | 32 assertSame(one, ai.getReference()); in testConstructor() 45 assertSame(one, ai.getReference()); in testGetSet() 47 assertSame(one, ai.get(mark)); in testGetSet() 50 assertSame(two, ai.getReference()); in testGetSet() 52 assertSame(two, ai.get(mark)); in testGetSet() 55 assertSame(one, ai.getReference()); in testGetSet() 57 assertSame(one, ai.get(mark)); in testGetSet() 70 assertSame(one, ai.get(mark)); in testAttemptMark() 81 assertSame(one, ai.get(mark)); in testCompareAndSet() 86 assertSame(two, ai.get(mark)); in testCompareAndSet() [all …]
|
D | AtomicStampedReferenceTest.java | 32 assertSame(one, ai.getReference()); in testConstructor() 45 assertSame(one, ai.getReference()); in testGetSet() 47 assertSame(one, ai.get(mark)); in testGetSet() 50 assertSame(two, ai.getReference()); in testGetSet() 52 assertSame(two, ai.get(mark)); in testGetSet() 55 assertSame(one, ai.getReference()); in testGetSet() 57 assertSame(one, ai.get(mark)); in testGetSet() 70 assertSame(one, ai.get(mark)); in testAttemptStamp() 81 assertSame(one, ai.get(mark)); in testCompareAndSet() 86 assertSame(two, ai.get(mark)); in testCompareAndSet() [all …]
|
D | AtomicReferenceFieldUpdaterTest.java | 54 assertSame(m4, a.get(this)); in checkCompareAndSetProtectedSub() 58 assertSame(seven, a.get(this)); in checkCompareAndSetProtectedSub() 68 assertSame(one, a.get(obj)); in checkPackageAccess() 70 assertSame(two, a.get(obj)); in checkPackageAccess() 157 assertSame(one, a.get(this)); in testGetSet() 159 assertSame(two, a.get(this)); in testGetSet() 161 assertSame(m3, a.get(this)); in testGetSet() 171 assertSame(one, a.get(this)); in testGetLazySet() 173 assertSame(two, a.get(this)); in testGetLazySet() 175 assertSame(m3, a.get(this)); in testGetLazySet() [all …]
|
D | ExchangerTest.java | 39 assertSame(one, e.exchange(two)); in testExchange() 40 assertSame(two, e.exchange(one)); in testExchange() 44 assertSame(two, e.exchange(one)); in testExchange() 45 assertSame(one, e.exchange(two)); in testExchange() 59 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 60 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 64 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 65 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 133 assertSame(two, e.exchange(one)); in testReplacementAfterExchange() 139 assertSame(one, e.exchange(two)); in testReplacementAfterExchange() [all …]
|
D | AtomicReferenceArrayTest.java | 68 assertSame(a[i], aa.get(i)); in testConstructorSubClassArray() 71 assertSame(x, aa.get(i)); in testConstructorSubClassArray() 111 assertSame(one, aa.get(i)); in testGetSet() 113 assertSame(two, aa.get(i)); in testGetSet() 115 assertSame(m3, aa.get(i)); in testGetSet() 126 assertSame(one, aa.get(i)); in testGetLazySet() 128 assertSame(two, aa.get(i)); in testGetLazySet() 130 assertSame(m3, aa.get(i)); in testGetLazySet() 143 assertSame(m4, aa.get(i)); in testCompareAndSet() 145 assertSame(m4, aa.get(i)); in testCompareAndSet() [all …]
|
D | ForkJoinTaskTest.java | 102 assertSame(expected, a.getRawResult()); in checkCompletedNormally() 107 assertSame(expected, a.join()); in checkCompletedNormally() 123 assertSame(expected, a.get()); in checkCompletedNormally() 126 assertSame(expected, a.get(5L, SECONDS)); in checkCompletedNormally() 172 assertSame(t.getClass(), a.getException().getClass()); 182 assertSame(t.getClass(), expected.getClass()); 196 assertSame(t.getClass(), success.getCause().getClass()); 203 assertSame(t.getClass(), success.getCause().getClass()); 427 assertSame(f, f.fork()); 442 assertSame(f, f.fork()); [all …]
|
D | RecursiveActionTest.java | 143 assertSame(t.getClass(), a.getException().getClass()); in checkCompletedAbnormally() 152 assertSame(expected.getClass(), t.getClass()); in checkCompletedAbnormally() 159 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 166 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 250 assertSame(f, f.fork()); in testForkJoin() 268 assertSame(f, f.fork()); in testJoinIgnoresInterrupts() 278 assertSame(f, f.fork()); in testJoinIgnoresInterrupts() 291 assertSame(f, f.fork()); in testJoinIgnoresInterrupts() 304 assertSame(f, f.fork()); in testJoinIgnoresInterrupts() 314 assertSame(f, f.fork()); in testJoinIgnoresInterrupts() [all …]
|
D | ThreadTest.java | 41 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 44 assertSame(eh, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 48 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 68 assertSame(eh, Thread.getDefaultUncaughtExceptionHandler()); in testGetAndSetDefaultUncaughtExceptionHandler() 75 assertSame(defaultHandler, Thread.getDefaultUncaughtExceptionHandler()); in testGetAndSetDefaultUncaughtExceptionHandler()
|
D | CountedCompleterTest.java | 166 assertSame(t.getClass(), a.getException().getClass()); 176 assertSame(t.getClass(), expected.getClass()); 190 assertSame(t.getClass(), success.getCause().getClass()); 197 assertSame(t.getClass(), success.getCause().getClass()); 204 assertSame(t, success); 264 assertSame(rawResult, this.rawResult.get()); 330 assertSame(success.getClass(), RuntimeException.class); 407 assertSame(a, b.getCompleter()); 409 assertSame(b, c.getCompleter()); 419 assertSame(a, a.getRoot()); [all …]
|
D | ThreadLocalTest.java | 46 assertSame(tl.get(), one); in testRemove() 48 assertSame(tl.get(), two); in testRemove() 50 assertSame(tl.get(), one); in testRemove() 58 assertSame(itl.get(), zero); in testRemoveITL() 60 assertSame(itl.get(), two); in testRemoveITL() 62 assertSame(itl.get(), zero); in testRemoveITL()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OptionalTest.java | 34 assertSame(Optional.<Integer>empty(), Optional.<String>empty()); in testEmpty_sameInstance() 35 assertSame(Optional.<String>empty(), Optional.<String>empty()); in testEmpty_sameInstance() 40 assertSame(Optional.<String>empty(), Optional.ofNullable(null)); in testEmpty_sameInstance() 54 assertSame(foo, optionalFoo.get()); in testGet() 81 assertSame(foo, reference.get()); in testIfPresent() 90 assertSame(empty, empty.filter(alwaysFail)); in testFilter() 91 assertSame(empty, empty.filter(alwaysFail)); in testFilter() 92 assertSame(ofNull, ofNull.filter(alwaysFail)); in testFilter() 93 assertSame(ofNull, ofNull.filter(alwaysFail)); in testFilter() 99 assertSame(empty, optionalFoo.filter(alwaysFalse)); in testFilter() [all …]
|
/libcore/luni/src/test/etc/loading-test-jar/ |
D | TestMethods.java | 46 public static void assertSame(Object expected, Object actual) { in assertSame() method in TestMethods 56 public static void assertSame(int expected, int actual) { in assertSame() method in TestMethods 94 assertSame("blort", Target.blort()); in test_callStaticMethod() 102 assertSame(22, Target.staticVariable); in test_getStaticVariable() 110 assertSame("zorch", target.zorch()); in test_callInstanceMethod() 119 assertSame(10098, target.instanceVariable); in test_getInstanceVariable() 132 assertSame("Muffins are tasty!\n", s.intern()); in test_getResourceAsStream() 150 assertSame("frotz", Target2.frotz()); in test_diff_callStaticMethod() 158 assertSame(220, Target2.staticIgram); in test_diff_getStaticVariable() 166 assertSame("fizmo", target.fizmo()); in test_diff_callInstanceMethod() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | BiPredicateTest.java | 37 … (x, y) -> { alwaysTrueInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testAnd() 39 …(x, y) -> { alwaysTrue2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testAnd() 41 …(x, y) -> { alwaysFalseInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false; … in testAnd() 43 …(x, y) -> { alwaysFalse2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false;… in testAnd() 78 (x, y) -> { assertSame(arg1, x); assertSame(arg2, y); return true; }; in testNegate() 82 (x, y) -> { assertSame(arg1, x); assertSame(arg2, y); return false; }; in testNegate() 97 … (x, y) -> { alwaysTrueInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testOr() 99 …(x, y) -> { alwaysTrue2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testOr() 101 …(x, y) -> { alwaysFalseInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false; … in testOr() 103 …(x, y) -> { alwaysFalse2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false;… in testOr()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StringBuilderTest.java | 98 assertSame(sb, sb.append(true)); in test_appendZ() 101 assertSame(sb, sb.append(false)); in test_appendZ() 110 assertSame(sb, sb.append('a')); in test_appendC() 113 assertSame(sb, sb.append('b')); in test_appendC() 122 assertSame(sb, sb.append(new char[] { 'a', 'b' })); in test_append$C() 125 assertSame(sb, sb.append(new char[] { 'c', 'd' })); in test_append$C() 140 assertSame(sb, sb.append(new char[] { 'a', 'b' }, 0, 2)); in test_append$CII() 143 assertSame(sb, sb.append(new char[] { 'c', 'd' }, 0, 2)); in test_append$CII() 147 assertSame(sb, sb.append(new char[] { 'a', 'b', 'c', 'd' }, 0, 2)); in test_append$CII() 151 assertSame(sb, sb.append(new char[] { 'a', 'b', 'c', 'd' }, 2, 2)); in test_append$CII() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ |
D | ElementTypeTest.java | 36 assertSame(ElementType.ANNOTATION_TYPE, ElementType in test_valueOfLjava_lang_String() 38 assertSame(ElementType.CONSTRUCTOR, ElementType.valueOf("CONSTRUCTOR")); in test_valueOfLjava_lang_String() 39 assertSame(ElementType.FIELD, ElementType.valueOf("FIELD")); in test_valueOfLjava_lang_String() 40 assertSame(ElementType.LOCAL_VARIABLE, ElementType in test_valueOfLjava_lang_String() 42 assertSame(ElementType.METHOD, ElementType.valueOf("METHOD")); in test_valueOfLjava_lang_String() 43 assertSame(ElementType.PACKAGE, ElementType.valueOf("PACKAGE")); in test_valueOfLjava_lang_String() 44 assertSame(ElementType.PARAMETER, ElementType.valueOf("PARAMETER")); in test_valueOfLjava_lang_String() 45 assertSame(ElementType.TYPE, ElementType.valueOf("TYPE")); in test_valueOfLjava_lang_String()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/ |
D | PreferenceChangeEventTest.java | 44 assertSame(Preferences.userRoot(), event.getNode()); in testConstructorNullValue() 45 assertSame(Preferences.userRoot(), event.getSource()); in testConstructorNullValue() 50 assertSame(Preferences.userRoot(), event.getNode()); in testConstructorNullValue() 51 assertSame(Preferences.userRoot(), event.getSource()); in testConstructorNullValue() 56 assertSame(Preferences.userRoot(), event.getNode()); in testConstructorNullValue() 57 assertSame(Preferences.userRoot(), event.getSource()); in testConstructorNullValue() 62 assertSame(Preferences.userRoot(), event.getNode()); in testConstructorNullValue() 63 assertSame(Preferences.userRoot(), event.getSource()); in testConstructorNullValue() 71 assertSame(Preferences.userRoot(), event.getNode()); in testConstructor() 72 assertSame(Preferences.userRoot(), event.getSource()); in testConstructor()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetEncoderTest.java | 92 assertSame(encoder, encoder.onMalformedInput(CodingErrorAction.IGNORE)); in testDefaultValue() 93 assertSame(encoder, encoder.onUnmappableCharacter(CodingErrorAction.IGNORE)); in testDefaultValue() 108 assertSame(encoder.charset(), cs); in testCharsetEncoderCharsetfloatfloat() 116 assertSame(encoder, encoder.onMalformedInput(CodingErrorAction.IGNORE)); in testCharsetEncoderCharsetfloatfloat() 117 assertSame(encoder, encoder in testCharsetEncoderCharsetfloatfloat() 122 assertSame(ec.charset(), cs); in testCharsetEncoderCharsetfloatfloat() 178 assertSame(ec.charset(), cs); in testCharsetEncoderCharsetfloatfloatbyteArray() 268 assertSame(encoder, encoder.reset()); in testResetIllegalState() 270 assertSame(encoder, encoder.reset()); in testResetIllegalState() 272 assertSame(encoder, encoder.reset()); in testResetIllegalState() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | AbstractMapTest.java | 78 assertSame("HashMap(0)", map1.keySet(), map1.keySet()); in test_keySet() 81 assertSame("HashMap(10)", map2.keySet(), map2.keySet()); in test_keySet() 84 assertSame("EMPTY_MAP", map3.keySet(), map3.keySet()); in test_keySet() 87 assertSame("IdentityHashMap", map4.keySet(), map4.keySet()); in test_keySet() 90 assertSame("LinkedHashMap", map5.keySet(), map5.keySet()); in test_keySet() 93 assertSame("TreeMap", map6.keySet(), map6.keySet()); in test_keySet() 96 assertSame("WeakHashMap", map7.keySet(), map7.keySet()); in test_keySet() 108 assertSame("HashMap(0)", map1.remove("key"), value); in test_removeLjava_lang_Object() 112 assertSame("IdentityHashMap", map4.remove(key), value); in test_removeLjava_lang_Object() 116 assertSame("LinkedHashMap", map5.remove(key), value); in test_removeLjava_lang_Object() [all …]
|