/libcore/ojluni/src/test/java/lang/String/concat/ |
D | ImplicitStringConcatShapes.java | 23 package test.java.lang.String.concat; 99 public static void test(String expected, String actual) { in test() method in ImplicitStringConcatShapes 219 test("-96.0", "" + s_dM); in run0() 220 test("null", "" + s_oNtS); in run0() 221 test("\u045176", "" + f_strU); in run0() 222 test("92", "" + sf_strU2); in run0() 223 test("51", "" + sf_strU1); in run0() 224 test("null", "" + s_iAN); in run0() 225 test("-54", "" + f_bM); in run0() 226 test("-87.0", "" + f_fM); in run0() [all …]
|
D | ImplicitStringConcatBoundaries.java | 23 package test.java.lang.String.concat; 151 test("foofalse", "foo" + BOOL_FALSE_1); in testImplicitStringConcatBoundaries() 152 test("foofalse", "foo" + BOOL_FALSE_2); in testImplicitStringConcatBoundaries() 153 test("footrue", "foo" + BOOL_TRUE_1); in testImplicitStringConcatBoundaries() 154 test("footrue", "foo" + BOOL_TRUE_2); in testImplicitStringConcatBoundaries() 156 test("foo127", "foo" + BYTE_MAX_1); in testImplicitStringConcatBoundaries() 157 test("foo127", "foo" + BYTE_MAX_2); in testImplicitStringConcatBoundaries() 158 test("foo-128", "foo" + BYTE_MIN_1); in testImplicitStringConcatBoundaries() 159 test("foo-128", "foo" + BYTE_MIN_2); in testImplicitStringConcatBoundaries() 161 test("foo32767", "foo" + SHORT_MAX_1); in testImplicitStringConcatBoundaries() [all …]
|
D | ImplicitStringConcat.java | 23 package test.java.lang.String.concat; 127 test("footrue", s + b); in testImplicitStringConcat() 128 test("foo42", s + by); in testImplicitStringConcat() 129 test("foo42", s + sh); in testImplicitStringConcat() 130 test("fooa", s + ch); in testImplicitStringConcat() 131 test("foo42", s + i); in testImplicitStringConcat() 132 test("foo42", s + l); in testImplicitStringConcat() 133 test("foo42.0", s + fl); in testImplicitStringConcat() 134 test("foo42.0", s + d); in testImplicitStringConcat() 135 test("foofoo", s + s); in testImplicitStringConcat() [all …]
|
D | CompactStringsInitialCoder.java | 23 package test.java.lang.String.concat; 80 test("\u0042", "" + '\u0042'); in testCompactStringsInitialCoder() 81 test("\u4242", "" + '\u4242'); in testCompactStringsInitialCoder() 83 test("\u0042", "" + charLatin1); in testCompactStringsInitialCoder() 84 test("\u4242", "" + charUTF16); in testCompactStringsInitialCoder() 86 test("\u0042", strEmpty + '\u0042'); in testCompactStringsInitialCoder() 87 test("\u4242", strEmpty + '\u4242'); in testCompactStringsInitialCoder() 89 test("\u0042\u0042", strLatin1 + '\u0042'); in testCompactStringsInitialCoder() 90 test("\u0042\u4242", strLatin1 + '\u4242'); in testCompactStringsInitialCoder() 91 test("\u4242\u0042", strUTF16 + '\u0042'); in testCompactStringsInitialCoder() [all …]
|
D | ImplicitStringConcatArgCount.java | 23 package test.java.lang.String.concat; 106 test("fo", s + s1); in testImplicitStringConcatArgCount() 107 test("foo", s + s1 + s2); in testImplicitStringConcatArgCount() 108 test("foo7", s + s1 + s2 + i); in testImplicitStringConcatArgCount() 109 test("foo77", s + s1 + s2 + i + i); in testImplicitStringConcatArgCount() 110 test("foo777", s + s1 + s2 + i + i + i); in testImplicitStringConcatArgCount() 111 test("foo7777", s + s1 + s2 + i + i + i + i); in testImplicitStringConcatArgCount() 112 test("foo77777", s + s1 + s2 + i + i + i + i + i); in testImplicitStringConcatArgCount() 113 test("foo777777", s + s1 + s2 + i + i + i + i + i + i); in testImplicitStringConcatArgCount() 114 test("foo7777777", s + s1 + s2 + i + i + i + i + i + i + i); in testImplicitStringConcatArgCount() [all …]
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | MinMax.java | 29 package test.java.lang.Math; 36 static void test(String what, float result, float correctResult) { in test() method in MinMax 43 static void test(String what, double result, double correctResult) { in test() method in MinMax 55 test("Math.min(fnz, fnz)", Math.min(fnz, fnz), fnz); in testMinMax() 56 test("Math.min(fnz, fpz)", Math.min(fnz, fpz), fnz); in testMinMax() 57 test("Math.min(fpz, fnz)", Math.min(fpz, fnz), fnz); in testMinMax() 58 test("Math.min(fpz, fpz)", Math.min(fpz, fpz), fpz); in testMinMax() 60 test("Math.min(-1.0f, fnz)", Math.min(-1.0f, fnz), -1.0f); in testMinMax() 61 test("Math.min(-1.0f, fpz)", Math.min(-1.0f, fpz), -1.0f); in testMinMax() 62 test("Math.min(+1.0f, fnz)", Math.min(+1.0f, fnz), fnz); in testMinMax() [all …]
|
D | RoundTests.java | 23 package test.java.lang.Math; 52 Tests.test("Math.round", input, Math.round(input), expected); in testNearHalfCases() 53 Tests.test("StrictMath.round", input, StrictMath.round(input), expected); in testNearHalfCases() 74 Tests.test("Math.round", input, Math.round(input), expected); in testNearHalfCases() 75 Tests.test("StrictMath.round", input, StrictMath.round(input), expected); in testNearHalfCases() 80 Tests.test("Math.round", Float.NaN, Math.round(Float.NaN), 0.0F); in testSpecialCases() 81 Tests.test("Math.round", Float.POSITIVE_INFINITY, in testSpecialCases() 83 Tests.test("Math.round", Float.NEGATIVE_INFINITY, in testSpecialCases() 85 Tests.test("Math.round", -(float) Integer.MIN_VALUE, in testSpecialCases() 87 Tests.test("Math.round", (float) Integer.MIN_VALUE, in testSpecialCases() [all …]
|
/libcore/ojluni/src/test/java/nio/file/Path/ |
D | PathOps.java | 28 package test.java.nio.file.Path; 204 static PathOps test(String first, String... more) { in test() method in PathOps 208 static PathOps test(Path path) { in test() method in PathOps 217 test("/") in doUnixTests() 219 test("/", "") in doUnixTests() 221 test("/", "foo") in doUnixTests() 223 test("/", "/foo") in doUnixTests() 225 test("/", "foo/") in doUnixTests() 227 test("foo", "bar", "gus") in doUnixTests() 229 test("") in doUnixTests() [all …]
|
/libcore/ojluni/src/test/java/util/UUID/ |
D | UUIDTest.java | 32 package test.java.util.UUID; 118 UUID test = UUID.fromString(str); in testFromStringError() local 126 UUID test = UUID.randomUUID(); in versionTest() local 127 if (test.version() != 4) in versionTest() 132 test = UUID.nameUUIDFromBytes(someBytes); in versionTest() 133 if (test.version() != 3) in versionTest() 135 test = UUID.fromString("9835451d-e2e0-1e41-8a5a-be785f17dcda"); in versionTest() 136 if (test.version() != 1) in versionTest() 138 test = UUID.fromString("9835451d-e2e0-2e41-8a5a-be785f17dcda"); in versionTest() 139 if (test.version() != 2) in versionTest() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestZoneId.java | 60 package test.java.time; 116 ZoneId test = ZoneOffset.UTC; in test_constant_UTC() local 117 assertEquals(test.getId(), "Z"); in test_constant_UTC() 118 assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), "Z"); in test_constant_UTC() 119 assertEquals(test.getRules().isFixedOffset(), true); in test_constant_UTC() 120 assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), ZoneOffset.UTC); in test_constant_UTC() 121 checkOffset(test.getRules(), createLDT(2008, 6, 30), ZoneOffset.UTC, 1); in test_constant_UTC() 128 ZoneId test = ZoneId.systemDefault(); in test_systemDefault() local 129 assertEquals(test.getId(), TimeZone.getDefault().getID()); in test_systemDefault() 158 ZoneId test = ZoneId.of("Europe/London"); in test_London() local [all …]
|
D | TestInstantSource.java | 23 package test.java.time; 49 var test = InstantSource.system(); in test_system() local 50 assertSame(test.withZone(ZoneOffset.UTC), Clock.systemUTC()); in test_system() 51 assertEquals(test.withZone(PARIS), Clock.system(PARIS)); in test_system() 53 var testMillis = test.millis(); in test_system() 54 var testInstantMillis = test.instant().toEpochMilli(); in test_system() 57 assertSame(test, InstantSource.system()); in test_system() 58 assertEquals(test.hashCode(), InstantSource.system().hashCode()); in test_system() 59 assertEquals(test.toString(), "SystemInstantSource"); in test_system() 66 var test = InstantSource.tick(InstantSource.fixed(instant), duration); [all …]
|
D | TestOffsetDateTime_instants.java | 60 package test.java.time; 100 OffsetDateTime test = OffsetDateTime.ofInstant(instant, OFFSET_PONE); in factory_ofInstant_allSecsInDay() local 101 assertEquals(test.getYear(), 1970); in factory_ofInstant_allSecsInDay() 102 assertEquals(test.getMonth(), Month.JANUARY); in factory_ofInstant_allSecsInDay() 103 assertEquals(test.getDayOfMonth(), 1 + (i >= 23 * 60 * 60 ? 1 : 0)); in factory_ofInstant_allSecsInDay() 104 assertEquals(test.getHour(), ((i / (60 * 60)) + 1) % 24); in factory_ofInstant_allSecsInDay() 105 assertEquals(test.getMinute(), (i / 60) % 60); in factory_ofInstant_allSecsInDay() 106 assertEquals(test.getSecond(), i % 60); in factory_ofInstant_allSecsInDay() 115 OffsetDateTime test = OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_allDaysInCycle() local 116 assertEquals(test, expected); in factory_ofInstant_allDaysInCycle() [all …]
|
D | TestOffsetDateTime.java | 60 package test.java.time; 130 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO); in test_withOffsetSameLocal() local 131 assertSame(test.toLocalDateTime(), base.toLocalDateTime()); in test_withOffsetSameLocal() 132 assertSame(test.getOffset(), OFFSET_PTWO); in test_withOffsetSameLocal() 138 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PONE); in test_withOffsetSameLocal_noChange() local 139 assertSame(test, base); in test_withOffsetSameLocal_noChange() 145 OffsetDateTime test = base.withOffsetSameInstant(OFFSET_PONE); in test_withOffsetSameInstant_noChange() local 146 assertSame(test, base); in test_withOffsetSameInstant_noChange() 152 OffsetDateTime test = base.withYear(2008); in test_withYear_noChange() local 153 assertSame(test, base); in test_withYear_noChange() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestDateTimeValueRange.java | 60 package test.java.time.temporal; 74 import test.java.time.AbstractTest; 95 ValueRange test = ValueRange.of(1, 12); in test_of_longlong() local 96 assertEquals(test.getMinimum(), 1); in test_of_longlong() 97 assertEquals(test.getLargestMinimum(), 1); in test_of_longlong() 98 assertEquals(test.getSmallestMaximum(), 12); in test_of_longlong() 99 assertEquals(test.getMaximum(), 12); in test_of_longlong() 100 assertEquals(test.isFixed(), true); in test_of_longlong() 101 assertEquals(test.isIntValue(), true); in test_of_longlong() 105 ValueRange test = ValueRange.of(1, 123456789012345L); in test_of_longlong_big() local [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 117 ZoneRules test = europeLondon(); in test_London() local 118 assertEquals(test.isFixedOffset(), false); in test_London() 123 ZoneRules test = europeLondon(); in test_London_preTimeZones() local 127 assertEquals(test.getOffset(instant), offset); in test_London_preTimeZones() 128 checkOffset(test, old.toLocalDateTime(), offset, 1); in test_London_preTimeZones() 129 assertEquals(test.getStandardOffset(instant), offset); in test_London_preTimeZones() 130 assertEquals(test.getDaylightSavings(instant), Duration.ZERO); in test_London_preTimeZones() 131 assertEquals(test.isDaylightSavings(instant), false); in test_London_preTimeZones() 136 ZoneRules test = europeLondon(); in test_London_getOffset() local 137 assertEquals(test.getOffset(createInstant(2008, 1, 1, ZoneOffset.UTC)), OFFSET_ZERO); in test_London_getOffset() [all …]
|
D | TCKFixedZoneRules.java | 112 public void test_getOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) { in test_getOffset_Instant() argument 113 assertEquals(test.getOffset(INSTANT), expectedOffset); in test_getOffset_Instant() 114 assertEquals(test.getOffset((Instant) null), expectedOffset); in test_getOffset_Instant() 118 public void test_getOffset_LocalDateTime(ZoneRules test, ZoneOffset expectedOffset) { in test_getOffset_LocalDateTime() argument 119 assertEquals(test.getOffset(LDT), expectedOffset); in test_getOffset_LocalDateTime() 120 assertEquals(test.getOffset((LocalDateTime) null), expectedOffset); in test_getOffset_LocalDateTime() 124 public void test_getValidOffsets_LDT(ZoneRules test, ZoneOffset expectedOffset) { in test_getValidOffsets_LDT() argument 125 assertEquals(test.getValidOffsets(LDT).size(), 1); in test_getValidOffsets_LDT() 126 assertEquals(test.getValidOffsets(LDT).get(0), expectedOffset); in test_getValidOffsets_LDT() 127 assertEquals(test.getValidOffsets(null).size(), 1); in test_getValidOffsets_LDT() [all …]
|
D | TCKZoneOffsetTransition.java | 121 ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0200, OFFSET_0300); in test_getters_gap() local 122 assertEquals(test.isGap(), true); in test_getters_gap() 123 assertEquals(test.isOverlap(), false); in test_getters_gap() 124 assertEquals(test.getDateTimeBefore(), before); in test_getters_gap() 125 assertEquals(test.getDateTimeAfter(), after); in test_getters_gap() 126 assertEquals(test.getInstant(), before.toInstant(OFFSET_0200)); in test_getters_gap() 127 assertEquals(test.getOffsetBefore(), OFFSET_0200); in test_getters_gap() 128 assertEquals(test.getOffsetAfter(), OFFSET_0300); in test_getters_gap() 129 assertEquals(test.getDuration(), Duration.of(1, HOURS)); in test_getters_gap() 136 ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0300, OFFSET_0200); in test_getters_overlap() local [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKTemporalAdjusters.java | 92 TemporalAdjuster test = TemporalAdjusters.ofDateAdjuster(date -> date.plusDays(2)); in factory_ofDateAdjuster() local 93 assertEquals(LocalDate.of(2012, 6, 30).with(test), LocalDate.of(2012, 7, 2)); in factory_ofDateAdjuster() 115 LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date); in test_firstDayOfMonth_nonLeap() local 116 assertEquals(test.getYear(), 2007); in test_firstDayOfMonth_nonLeap() 117 assertEquals(test.getMonth(), month); in test_firstDayOfMonth_nonLeap() 118 assertEquals(test.getDayOfMonth(), 1); in test_firstDayOfMonth_nonLeap() 128 LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date); in test_firstDayOfMonth_leap() local 129 assertEquals(test.getYear(), 2008); in test_firstDayOfMonth_leap() 130 assertEquals(test.getMonth(), month); in test_firstDayOfMonth_leap() 131 assertEquals(test.getDayOfMonth(), 1); in test_firstDayOfMonth_leap() [all …]
|
/libcore/dom/src/test/java/org/w3c/domts/ |
D | DOMTestInnerClass.java | 27 private final DOMTestCase test; field in DOMTestInnerClass 29 public DOMTestInnerClass(DOMTestCase test) { in DOMTestInnerClass() argument 30 this.test = test; in DOMTestInnerClass() 34 test.wait(millisecond); in wait() 38 test.assertTrue(assertID, actual); in assertTrue() 42 test.assertFalse(assertID, actual); in assertFalse() 46 test.assertNull(assertID, actual); in assertNull() 50 test.assertNotNull(assertID, actual); in assertNotNull() 54 test.assertSame(assertID, expected, actual); in assertSame() 58 test.assertInstanceOf(assertID, cls, obj); in assertInstanceOf() [all …]
|
D | DOMTestFramework.java | 34 void fail(DOMTestCase test, String assertID); in fail() argument 36 void assertTrue(DOMTestCase test, String assertID, boolean actual); in assertTrue() argument 38 void assertFalse(DOMTestCase test, String assertID, boolean actual); in assertFalse() argument 40 void assertNull(DOMTestCase test, String assertID, Object actual); in assertNull() argument 42 void assertNotNull(DOMTestCase test, String assertID, Object actual); in assertNotNull() argument 45 DOMTestCase test, in assertSame() argument 51 DOMTestCase test, in assertInstanceOf() argument 57 DOMTestCase test, in assertSize() argument 63 DOMTestCase test, in assertSize() argument 69 DOMTestCase test, in assertSize() argument [all …]
|
D | JUnitTestSuiteAdapter.java | 23 private DOMTestSuite test; field in JUnitTestSuiteAdapter 25 public JUnitTestSuiteAdapter(DOMTestSuite test) { in JUnitTestSuiteAdapter() argument 26 super(test.getTargetURI()); in JUnitTestSuiteAdapter() 27 this.test = test; in JUnitTestSuiteAdapter() 28 test.build(this); in JUnitTestSuiteAdapter() 32 DOMTestDocumentBuilderFactory factory = test.getFactory(); in addTest() 48 TestCase test = new JUnitTestCaseAdapter((DOMTestCase) domtest); in addTest() local 49 addTest(test); in addTest() 53 TestSuite test = new JUnitTestSuiteAdapter((DOMTestSuite) domtest); in addTest() local 54 addTest(test); in addTest()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKDateTimeFormatter.java | 138 DateTimeFormatter test = base.withLocale(Locale.GERMAN); in test_withLocale() local 139 assertEquals(test.getLocale(), Locale.GERMAN); in test_withLocale() 151 DateTimeFormatter test = fmt; in test_withChronology() local 152 assertEquals(test.getChronology(), null); in test_withChronology() 153 test = test.withChronology(IsoChronology.INSTANCE); in test_withChronology() 154 assertEquals(test.getChronology(), IsoChronology.INSTANCE); in test_withChronology() 155 test = test.withChronology(null); in test_withChronology() 156 assertEquals(test.getChronology(), null); in test_withChronology() 162 DateTimeFormatter test = fmt; in test_withZone() local 163 assertEquals(test.getZone(), null); in test_withZone() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKZonedDateTime.java | 232 ZonedDateTime test = ZonedDateTime.now(); in now() local 233 … long diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay()); in now() 237 test = ZonedDateTime.now(); in now() 238 … diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay()); in now() 255 ZonedDateTime test = ZonedDateTime.now(zone); 256 assertEquals(Duration.between(expected, test).truncatedTo(ChronoUnit.SECONDS), 273 ZonedDateTime test = ZonedDateTime.now(clock); 274 assertEquals(test.getYear(), 1970); 275 assertEquals(test.getMonth(), Month.JANUARY); 276 assertEquals(test.getDayOfMonth(), (i < 24 * 60 * 60 ? 1 : 2)); [all …]
|
D | TCKYearMonth.java | 163 void check(YearMonth test, int y, int m) { in check() argument 164 assertEquals(test.getYear(), y); in check() 165 assertEquals(test.getMonth().getValue(), m); in check() 174 YearMonth test = YearMonth.now(); in now() local 176 if (expected.equals(test)) { in now() 180 test = YearMonth.now(); in now() 182 assertEquals(test, expected); in now() 197 YearMonth test = YearMonth.now(zone); in now_ZoneId() local 199 if (expected.equals(test)) { in now_ZoneId() 203 test = YearMonth.now(zone); in now_ZoneId() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/zone/ |
D | TestFixedZoneRules.java | 60 package test.java.time.zone; 88 ZoneRules test = make(OFFSET_PONE); in test_data_nullInput() local 89 assertEquals(test.getOffset((Instant) null), OFFSET_PONE); in test_data_nullInput() 90 assertEquals(test.getOffset((LocalDateTime) null), OFFSET_PONE); in test_data_nullInput() 91 assertEquals(test.getValidOffsets(null).size(), 1); in test_data_nullInput() 92 assertEquals(test.getValidOffsets(null).get(0), OFFSET_PONE); in test_data_nullInput() 93 assertEquals(test.getTransition(null), null); in test_data_nullInput() 94 assertEquals(test.getStandardOffset(null), OFFSET_PONE); in test_data_nullInput() 95 assertEquals(test.getDaylightSavings(null), Duration.ZERO); in test_data_nullInput() 96 assertEquals(test.isDaylightSavings(null), false); in test_data_nullInput() [all …]
|