/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 | 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 | 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 | 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/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/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 | 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 | 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 | 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 …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | RecursiveTaskTest.java | 119 assertSame(expected, a.getRawResult()); in checkCompletedNormally() 120 assertSame(expected, a.join()); in checkCompletedNormally() 124 assertSame(expected, a.get()); in checkCompletedNormally() 127 assertSame(expected, a.get(5L, SECONDS)); in checkCompletedNormally() 183 assertSame(t.getClass(), a.getException().getClass()); in checkCompletedAbnormally() 192 assertSame(t.getClass(), expected.getClass()); in checkCompletedAbnormally() 199 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 206 assertSame(t.getClass(), success.getCause().getClass()); in checkCompletedAbnormally() 281 assertSame(NoResult, testInvokeOnPool(mainPool(), a)); in testQuietlyInvoke() 291 assertSame(f, f.fork()); in testForkJoin() [all …]
|
D | AtomicReferenceTest.java | 55 assertSame(one, ai.get()); in testConstructor() 71 assertSame(one, ai.get()); in testGetSet() 73 assertSame(two, ai.get()); in testGetSet() 75 assertSame(m3, ai.get()); in testGetSet() 83 assertSame(one, ai.get()); in testGetLazySet() 85 assertSame(two, ai.get()); in testGetLazySet() 87 assertSame(m3, ai.get()); in testGetLazySet() 97 assertSame(m4, ai.get()); in testCompareAndSet() 99 assertSame(m4, ai.get()); in testCompareAndSet() 101 assertSame(seven, ai.get()); in testCompareAndSet() [all …]
|
D | AtomicMarkableReferenceTest.java | 55 assertSame(one, ai.getReference()); in testConstructor() 68 assertSame(one, ai.getReference()); in testGetSet() 70 assertSame(one, ai.get(mark)); in testGetSet() 73 assertSame(two, ai.getReference()); in testGetSet() 75 assertSame(two, ai.get(mark)); in testGetSet() 78 assertSame(one, ai.getReference()); in testGetSet() 80 assertSame(one, ai.get(mark)); in testGetSet() 93 assertSame(one, ai.get(mark)); in testAttemptMark() 104 assertSame(one, ai.get(mark)); in testCompareAndSet() 109 assertSame(two, ai.get(mark)); in testCompareAndSet() [all …]
|
D | AtomicStampedReferenceTest.java | 55 assertSame(one, ai.getReference()); in testConstructor() 68 assertSame(one, ai.getReference()); in testGetSet() 70 assertSame(one, ai.get(mark)); in testGetSet() 73 assertSame(two, ai.getReference()); in testGetSet() 75 assertSame(two, ai.get(mark)); in testGetSet() 78 assertSame(one, ai.getReference()); in testGetSet() 80 assertSame(one, ai.get(mark)); in testGetSet() 93 assertSame(one, ai.get(mark)); in testAttemptStamp() 104 assertSame(one, ai.get(mark)); in testCompareAndSet() 109 assertSame(two, ai.get(mark)); in testCompareAndSet() [all …]
|
D | AtomicReferenceFieldUpdaterTest.java | 77 assertSame(m4, a.get(this)); in checkCompareAndSetProtectedSub() 81 assertSame(seven, a.get(this)); in checkCompareAndSetProtectedSub() 91 assertSame(one, a.get(obj)); in checkPackageAccess() 93 assertSame(two, a.get(obj)); in checkPackageAccess() 180 assertSame(one, a.get(this)); in testGetSet() 182 assertSame(two, a.get(this)); in testGetSet() 184 assertSame(m3, a.get(this)); in testGetSet() 194 assertSame(one, a.get(this)); in testGetLazySet() 196 assertSame(two, a.get(this)); in testGetLazySet() 198 assertSame(m3, a.get(this)); in testGetLazySet() [all …]
|
D | ExchangerTest.java | 62 assertSame(one, e.exchange(two)); in testExchange() 63 assertSame(two, e.exchange(one)); in testExchange() 67 assertSame(two, e.exchange(one)); in testExchange() 68 assertSame(one, e.exchange(two)); in testExchange() 82 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 83 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 87 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 88 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange() 156 assertSame(two, e.exchange(one)); in testReplacementAfterExchange() 162 assertSame(one, e.exchange(two)); in testReplacementAfterExchange() [all …]
|
D | AtomicReferenceArrayTest.java | 91 assertSame(a[i], aa.get(i)); in testConstructorSubClassArray() 94 assertSame(x, aa.get(i)); in testConstructorSubClassArray() 134 assertSame(one, aa.get(i)); in testGetSet() 136 assertSame(two, aa.get(i)); in testGetSet() 138 assertSame(m3, aa.get(i)); in testGetSet() 149 assertSame(one, aa.get(i)); in testGetLazySet() 151 assertSame(two, aa.get(i)); in testGetLazySet() 153 assertSame(m3, aa.get(i)); in testGetLazySet() 166 assertSame(m4, aa.get(i)); in testCompareAndSet() 168 assertSame(m4, aa.get(i)); in testCompareAndSet() [all …]
|
/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/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/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/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/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 …]
|