Home
last modified time | relevance | path

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

12345678910>>...15

/libcore/ojluni/src/test/java/time/test/java/time/
DTestLocalDate.java85 TEST_2007_07_15 = LocalDate.of(2007, 7, 15); in setUp()
180 {LocalDate.of(-1, 1, 1)}, in provider_samplePlusWeeksSymmetry()
181 {LocalDate.of(-1, 2, 28)}, in provider_samplePlusWeeksSymmetry()
182 {LocalDate.of(-1, 3, 1)}, in provider_samplePlusWeeksSymmetry()
183 {LocalDate.of(-1, 12, 31)}, in provider_samplePlusWeeksSymmetry()
184 {LocalDate.of(0, 1, 1)}, in provider_samplePlusWeeksSymmetry()
185 {LocalDate.of(0, 2, 28)}, in provider_samplePlusWeeksSymmetry()
186 {LocalDate.of(0, 2, 29)}, in provider_samplePlusWeeksSymmetry()
187 {LocalDate.of(0, 3, 1)}, in provider_samplePlusWeeksSymmetry()
188 {LocalDate.of(0, 12, 31)}, in provider_samplePlusWeeksSymmetry()
[all …]
DTestOffsetDateTime.java86 …TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, … in setUp()
109 LocalDate localDate = LocalDate.of(y, o, d); in test_get_same()
110 LocalTime localTime = LocalTime.of(h, m, s, n); in test_get_same()
111 LocalDateTime localDateTime = LocalDateTime.of(localDate, localTime); in test_get_same()
112 OffsetDateTime a = OffsetDateTime.of(localDateTime, offset); in test_get_same()
125 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal()
133 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal_noChange()
140 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameInstant_noChange()
147 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withYear_noChange()
154 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withMonth_noChange()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYear.java120 private static final Year TEST_2008 = Year.of(2008);
180 ZoneId zone = ZoneId.of("UTC+01:02:03"); in now_ZoneId()
198 …Instant instant = OffsetDateTime.of(LocalDate.of(2010, 12, 31), LocalTime.of(0, 0), ZoneOffset.UTC… in now_Clock()
213 Year test = Year.of(i); in test_factory_int_singleton()
215 assertEquals(Year.of(i), test); in test_factory_int_singleton()
221 Year.of(Year.MIN_VALUE - 1); in test_factory_int_tooLow()
226 Year.of(Year.MAX_VALUE + 1); in test_factory_int_tooHigh()
232 assertEquals(Year.from(LocalDate.of(2007, 7, 15)), Year.of(2007)); in test_from_TemporalAccessor()
237 Year.from(LocalTime.of(12, 30)); in test_from_TemporalAccessor_invalid_noDerive()
251 {"0000", Year.of(0)}, in provider_goodParseData()
[all …]
DTCKYearMonth.java130 TEST_2008_06 = YearMonth.of(2008, 6); in setUp()
195 ZoneId zone = ZoneId.of("UTC+01:02:03"); in now_ZoneId()
213 Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC); in now_Clock()
228 YearMonth test = YearMonth.of(2008, Month.FEBRUARY); in factory_intsMonth()
234 YearMonth.of(Year.MIN_VALUE - 1, Month.JANUARY); in test_factory_intsMonth_yearTooLow()
239 YearMonth.of(Year.MAX_VALUE + 1, Month.JANUARY); in test_factory_intsMonth_dayTooHigh()
244 YearMonth.of(2008, null); in factory_intsMonth_nullMonth()
250 YearMonth test = YearMonth.of(2008, 2); in factory_ints()
256 YearMonth.of(Year.MIN_VALUE - 1, 2); in test_factory_ints_yearTooLow()
261 YearMonth.of(Year.MAX_VALUE + 1, 2); in test_factory_ints_dayTooHigh()
[all …]
DTCKOffsetDateTime.java153 private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
154 private static final ZoneId ZONE_GAZA = ZoneId.of("Asia/Gaza");
167 … TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE); in setUp()
309 OffsetDateTime base = OffsetDateTime.of(1970, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC);
344 assertEquals(OffsetDateTime.of(LocalDateTime.of(y, mo, d, h, m, s, n), offset), test);
352 OffsetDateTime test = OffsetDateTime.of(2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE);
359 LocalDate date = LocalDate.of(2008, 6, 30);
360 LocalTime time = LocalTime.of(11, 30, 10, 500);
361 OffsetDateTime test = OffsetDateTime.of(date, time, OFFSET_PONE);
367 LocalTime time = LocalTime.of(11, 30, 10, 500);
[all …]
DTCKLocalDate.java138 private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
139 private static final ZoneId ZONE_GAZA = ZoneId.of("Asia/Gaza");
154 TEST_2007_07_15 = LocalDate.of(2007, 7, 15); in setUp()
210 assertEquals(LocalDate.of(y, m, d), test); in check()
253 ZoneId zone = ZoneId.of("UTC+01:02:03"); in now_ZoneId()
342 assertEquals(TEST_2007_07_15, LocalDate.of(2007, Month.JULY, 15));
347 LocalDate.of(2007, Month.FEBRUARY, 29);
352 LocalDate.of(2007, Month.APRIL, 31);
357 LocalDate.of(2007, Month.JANUARY, 0);
362 LocalDate.of(2007, Month.JANUARY, 32);
[all …]
DTCKMonthDay.java114 TEST_07_15 = MonthDay.of(7, 15); in setUp()
176 ZoneId zone = ZoneId.of("UTC+01:02:03"); in now_ZoneId()
194 Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC); in now_Clock()
209 assertEquals(TEST_07_15, MonthDay.of(Month.JULY, 15)); in factory_intMonth()
214 MonthDay.of(Month.JANUARY, 0); in test_factory_intMonth_dayTooLow()
219 MonthDay.of(Month.JANUARY, 32); in test_factory_intMonth_dayTooHigh()
224 MonthDay.of(null, 15); in factory_intMonth_nullMonth()
235 MonthDay.of(1, 0); in test_factory_ints_dayTooLow()
240 MonthDay.of(1, 32); in test_factory_ints_dayTooHigh()
246 MonthDay.of(0, 1); in test_factory_ints_monthTooLow()
[all …]
DTCKPeriod.java148 assertPeriod(Period.of(1, 2, 3), 1, 2, 3); in factory_of_ints()
149 assertPeriod(Period.of(0, 2, 3), 0, 2, 3); in factory_of_ints()
150 assertPeriod(Period.of(1, 0, 0), 1, 0, 0); in factory_of_ints()
151 assertPeriod(Period.of(0, 0, 0), 0, 0, 0); in factory_of_ints()
152 assertPeriod(Period.of(-1, -2, -3), -1, -2, -3); in factory_of_ints()
160 TemporalAmount amount = Period.of(1, 2, 3); in factory_from_TemporalAmount_Period()
322 {"P0Y0M0D", Period.of(0, 0, 0)}, in data_factory_parseSuccess()
323 {"P2Y0M0D", Period.of(2, 0, 0)}, in data_factory_parseSuccess()
324 {"P0Y3M0D", Period.of(0, 3, 0)}, in data_factory_parseSuccess()
325 {"P0Y0M4D", Period.of(0, 0, 4)}, in data_factory_parseSuccess()
[all …]
DTCKOffsetTime.java136 private static final ZoneId ZONE_GAZA = ZoneId.of("Asia/Gaza");
139 private static final LocalDate DATE = LocalDate.of(2008, 12, 3);
148 TEST_11_30_59_500_PONE = OffsetTime.of(11, 30, 59, 500, OFFSET_PONE); in setUp()
251 Instant base = LocalDateTime.of(1970, 1, 1, 12, 0).toInstant(ZoneOffset.UTC);
278 assertEquals(test.toLocalTime(), LocalTime.of(h, m, s, n));
288 assertEquals(OffsetTime.of(LocalTime.of(h, m, s, n), offset), test);
294 OffsetTime test = OffsetTime.of(11, 30, 10, 500, OFFSET_PONE);
301 LocalTime localTime = LocalTime.of(11, 30, 10, 500);
302 OffsetTime test = OffsetTime.of(localTime, OFFSET_PONE);
308 OffsetTime.of((LocalTime) null, OFFSET_PONE);
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKIsoFields.java94 {LocalDate.of(1969, 12, 29), 90, 4}, in data_quarter()
95 {LocalDate.of(1969, 12, 30), 91, 4}, in data_quarter()
96 {LocalDate.of(1969, 12, 31), 92, 4}, in data_quarter()
98 {LocalDate.of(1970, 1, 1), 1, 1}, in data_quarter()
99 {LocalDate.of(1970, 1, 2), 2, 1}, in data_quarter()
100 {LocalDate.of(1970, 2, 28), 59, 1}, in data_quarter()
101 {LocalDate.of(1970, 3, 1), 60, 1}, in data_quarter()
102 {LocalDate.of(1970, 3, 31), 90, 1}, in data_quarter()
104 {LocalDate.of(1970, 4, 1), 1, 2}, in data_quarter()
105 {LocalDate.of(1970, 6, 30), 91, 2}, in data_quarter()
[all …]
DTCKChronoUnit.java135 {CENTURIES, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2100, 1, 10)}, in data_unitAndTemporal()
136 {DECADES, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2010, 1, 10)}, in data_unitAndTemporal()
137 {YEARS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2001, 1, 10)}, in data_unitAndTemporal()
138 {MONTHS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2000, 2, 10)}, in data_unitAndTemporal()
139 {WEEKS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2000, 1, 17)}, in data_unitAndTemporal()
140 {DAYS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2000, 1, 11)}, in data_unitAndTemporal()
142 {HALF_DAYS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(13, 2, 3, 400)}, in data_unitAndTemporal()
143 {HOURS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(2, 2, 3, 400)}, in data_unitAndTemporal()
144 {MINUTES, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(1, 3, 3, 400)}, in data_unitAndTemporal()
145 {SECONDS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(1, 2, 4, 400)}, in data_unitAndTemporal()
[all …]
DTCKChronoField.java201 {YEAR, LocalDate.of(2000, 2, 29), true, 2000}, in data_fieldAndAccessor()
202 {YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 2000}, in data_fieldAndAccessor()
203 {MONTH_OF_YEAR, LocalDate.of(2000, 2, 29), true, 2}, in data_fieldAndAccessor()
204 {MONTH_OF_YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 2}, in data_fieldAndAccessor()
205 {DAY_OF_MONTH, LocalDate.of(2000, 2, 29), true, 29}, in data_fieldAndAccessor()
206 {DAY_OF_MONTH, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 29}, in data_fieldAndAccessor()
207 {DAY_OF_YEAR, LocalDate.of(2000, 2, 29), true, 60}, in data_fieldAndAccessor()
208 {DAY_OF_YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 60}, in data_fieldAndAccessor()
210 {HOUR_OF_DAY, LocalTime.of(5, 4, 3, 200), true, 5}, in data_fieldAndAccessor()
211 {HOUR_OF_DAY, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 5}, in data_fieldAndAccessor()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DCharacter_UnicodeBlockTest.java24 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char) 0x0)); in test_ofC()
25 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char) 0x7f)); in test_ofC()
26 … assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char) 0x80)); in test_ofC()
27 … assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char) 0xff)); in test_ofC()
28 … assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char) 0x100)); in test_ofC()
29 … assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char) 0x17f)); in test_ofC()
30 … assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char) 0x180)); in test_ofC()
31 … assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char) 0x24f)); in test_ofC()
32 … assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char) 0x250)); in test_ofC()
33 … assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char) 0x2af)); in test_ofC()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestUmmAlQuraChronology.java81 private static final ZoneId ZONE_RIYADH = ZoneId.of("Asia/Riyadh");
86 HijrahChronology hc = (HijrahChronology) Chronology.of("Hijrah"); in test_aliases()
88 hc = (HijrahChronology) Chronology.of("islamic"); in test_aliases()
95 Chronology test = Chronology.of("Hijrah-ummalqura"); in test_badChronology()
104 {HijrahDate.of(1318, 1, 1), LocalDate.of(1900, 04, 30)}, in data_UmmAlQuraVsISODates()
105 {HijrahDate.of(1318, 12, 29), LocalDate.of(1901, 04, 19)}, in data_UmmAlQuraVsISODates()
106 {HijrahDate.of(1319, 01, 01), LocalDate.of(1901, 04, 20)}, in data_UmmAlQuraVsISODates()
107 {HijrahDate.of(1433, 12, 29), LocalDate.of(2012, 11, 14)}, in data_UmmAlQuraVsISODates()
108 {HijrahDate.of(1434, 01, 01), LocalDate.of(2012, 11, 15)}, in data_UmmAlQuraVsISODates()
109 {HijrahDate.of(1434, 02, 18), LocalDate.of(2012, 12, 31)}, in data_UmmAlQuraVsISODates()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DSetOfTest.java42 new SerializationTester<>(Set.<String>of(), golden).test(); in of_serializationCompatibility_empty()
52 new SerializationTester<>(Set.of("one"), golden).test(); in of_serializationCompatibility_oneElement()
66 new SerializationTester<>(Set.of(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0), golden).test(); in of_serializationCompatibility_manyElements()
70 Set<?> list = Set.of("element", 42); in mixedTypes()
80 assertThrowsIae(() -> { Set.of("duplicate", "duplicate"); }); in duplicate()
81 assertThrowsIae(() -> { Set.of("duplicate", "duplicate", "duplicate"); }); in duplicate()
82 assertThrowsIae(() -> { Set.of("a", "duplicate", "duplicate"); }); in duplicate()
84 Set.of("a", "duplicate", "b", "c", "d", "e", "f", "g", "duplicate"); in duplicate()
86 assertThrowsIae(() -> { Set.of("a", "duplicate", "b", "c", "d", "e", "f", "g", in duplicate()
95 assertThrowsNpe(() -> { Set.of("duplicate", null, "duplicate"); }); // null first in duplicateAndNull()
[all …]
DListOfTest.java45 new SerializationTester<>(List.<String>of(), golden).test(); in serializationCompatibility_empty()
56 new SerializationTester<>(List.of("one"), golden).test(); in serializationCompatibility_oneElement()
71 new SerializationTester<>(List.of(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0), golden).test(); in serializationCompatibility_manyElements()
75 List<?> list = List.of("element", 42); in mixedTypes()
86 check_nonEmpty(asList("duplicate", "duplicate"), List.of("duplicate", "duplicate")); in duplicates_allowed()
91 Collections.<String>emptyList(), List.<String>of(), "non-null example String"); in empty()
95 check_nonEmpty(asList("one"), List.of("one")); in nonEmpty()
96 check_nonEmpty(asList("one", "two"), List.of("one", "two")); in nonEmpty()
97 check_nonEmpty(asList("one", "two", "three"), List.of("one", "two", "three")); in nonEmpty()
99 List.of("one", "two", "three", "four")); in nonEmpty()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneOffsetTransition.java91 ZoneOffsetTransition.of(null, OFFSET_0100, OFFSET_0200); in test_factory_nullTransition()
96 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), null, OFFSET_0200); in test_factory_nullOffsetBefore()
101 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, null); in test_factory_nullOffsetAfter()
106 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, OFFSET_0200); in test_factory_sameOffset()
111 … ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30, 0, 500), OFFSET_0200, OFFSET_0300); in test_factory_noNanos()
119 LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0); in test_getters_gap()
120 LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0); in test_getters_gap()
121 ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0200, OFFSET_0300); in test_getters_gap()
129 assertEquals(test.getDuration(), Duration.of(1, HOURS)); in test_getters_gap()
134 LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0); in test_getters_overlap()
[all …]
DTCKZoneOffsetTransitionRule.java82 private static final LocalTime TIME_0100 = LocalTime.of(1, 0);
91 ZoneOffsetTransitionRule.of( in test_factory_nullMonth()
98 ZoneOffsetTransitionRule.of( in test_factory_nullTime()
105 ZoneOffsetTransitionRule.of( in test_factory_nullTimeDefinition()
112 ZoneOffsetTransitionRule.of( in test_factory_nullStandardOffset()
119 ZoneOffsetTransitionRule.of( in test_factory_nullOffsetBefore()
126 ZoneOffsetTransitionRule.of( in test_factory_nullOffsetAfter()
133 ZoneOffsetTransitionRule.of( in test_factory_invalidDayOfMonthIndicator_tooSmall()
140 ZoneOffsetTransitionRule.of( in test_factory_invalidDayOfMonthIndicator_zero()
147 ZoneOffsetTransitionRule.of( in test_factory_invalidDayOfMonthIndicator_tooLarge()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKFormatStyle.java80 private static final ZoneId ZONEID_PARIS = ZoneId.of("Europe/Paris");
81 private static final ZoneId OFFSET_PTWO = ZoneOffset.of("+02:00");
97 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.FULL, "Tuesda… in data_formatStyle()
98 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.LONG, "2 Octo… in data_formatStyle()
99 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.MEDIUM, "2 Oc… in data_formatStyle()
100 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.SHORT, "02/10… in data_formatStyle()
102 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.FULL, "Tuesday… in data_formatStyle()
103 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.LONG, "2 Octob… in data_formatStyle()
104 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.MEDIUM, "2 Oct… in data_formatStyle()
105 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.SHORT, "02/10/… in data_formatStyle()
DTCKSignStyle.java93 {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, in data_signStyle()
94 {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, in data_signStyle()
95 {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, in data_signStyle()
97 {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, in data_signStyle()
98 {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, in data_signStyle()
100 {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, in data_signStyle()
101 {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, in data_signStyle()
103 {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, in data_signStyle()
104 {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, in data_signStyle()
106 {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, in data_signStyle()
[all …]
DTCKLocalizedFieldParser.java99 WeekFields weekDef = WeekFields.of(locale); in test_parse_textField()
135 {"e W M y", "1 1 1 2012", 0, 10, LocalDate.of(2012, 1, 1)}, in provider_patternLocalDate()
136 {"e W M y", "1 2 1 2012", 0, 10, LocalDate.of(2012, 1, 8)}, in provider_patternLocalDate()
137 {"e W M y", "2 2 1 2012", 0, 10, LocalDate.of(2012, 1, 9)}, in provider_patternLocalDate()
138 {"e W M y", "3 2 1 2012", 0, 10, LocalDate.of(2012, 1, 10)}, in provider_patternLocalDate()
139 {"e W M y", "1 3 1 2012", 0, 10, LocalDate.of(2012, 1, 15)}, in provider_patternLocalDate()
140 {"e W M y", "2 3 1 2012", 0, 10, LocalDate.of(2012, 1, 16)}, in provider_patternLocalDate()
141 {"e W M y", "6 2 1 2012", 0, 10, LocalDate.of(2012, 1, 13)}, in provider_patternLocalDate()
142 {"e W M y", "6 2 7 2012", 0, 10, LocalDate.of(2012, 7, 13)}, in provider_patternLocalDate()
144 … "Date: 2012-07, day-of-week: 6, week-of-month: 3", 0, 47, LocalDate.of(2012, 7, 20)}, in provider_patternLocalDate()
[all …]
/libcore/luni/src/test/java/libcore/java/time/
DOffsetDateTimeTest.java35 OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 6, ZoneOffset.UTC);
43 assertEquals(OffsetDateTime.of(2000, 1, 2, 4, 4, 5, 6, ZoneOffset.UTC), in test_plus()
45 assertEquals(OffsetDateTime.of(2000, 1, 3, 2, 4, 5, 6, ZoneOffset.UTC), in test_plus()
47 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus()
49 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus()
51 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 1_000_006, ZoneOffset.UTC), in test_plus()
53 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 7, ZoneOffset.UTC), in test_plus()
59 assertEquals(OffsetDateTime.of(2000, 1, 2, 2, 4, 5, 6, ZoneOffset.UTC), in test_minus_utc_offset()
61 assertEquals(OffsetDateTime.of(2000, 1, 1, 4, 4, 5, 6, ZoneOffset.UTC), in test_minus_utc_offset()
63 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 3, 5, 6, ZoneOffset.UTC), in test_minus_utc_offset()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)),
138 NANO_OF_DAY("NanoOfDay", NANOS, DAYS, ValueRange.of(0, 86400L * 1000_000_000L - 1)),
158 MICRO_OF_SECOND("MicroOfSecond", MICROS, SECONDS, ValueRange.of(0, 999_999)),
177 MICRO_OF_DAY("MicroOfDay", MICROS, DAYS, ValueRange.of(0, 86400L * 1000_000L - 1)),
197 MILLI_OF_SECOND("MilliOfSecond", MILLIS, SECONDS, ValueRange.of(0, 999)),
216 MILLI_OF_DAY("MilliOfDay", MILLIS, DAYS, ValueRange.of(0, 86400L * 1000L - 1)),
226 SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"),
238 SECOND_OF_DAY("SecondOfDay", SECONDS, DAYS, ValueRange.of(0, 86400L - 1)),
248 MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59), "minute"),
259 MINUTE_OF_DAY("MinuteOfDay", MINUTES, DAYS, ValueRange.of(0, (24 * 60) - 1)),
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneOffsetTransitionSerialization.java85 LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53); in test_serialization_unusual1()
86 …ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of in test_serialization_unusual1()
92 LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3); in test_serialization_unusual2()
93 …ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of in test_serialization_unusual2()
99 LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0); in test_serialization_gap()
100 LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0); in test_serialization_gap()
101 ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0200, OFFSET_0300); in test_serialization_gap()
107 LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0); in test_serialization_overlap()
108 LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0); in test_serialization_overlap()
109 ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0300, OFFSET_0200); in test_serialization_overlap()
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestDateTimeValueRange.java94 ValueRange test = ValueRange.of(1, 12); in test_of_longlong()
104 ValueRange test = ValueRange.of(1, 123456789012345L); in test_of_longlong_big()
115 ValueRange.of(12, 1); in test_of_longlong_minGtMax()
122 ValueRange test = ValueRange.of(1, 28, 31); in test_of_longlonglong()
133 ValueRange.of(12, 1, 2); in test_of_longlonglong_minGtMax()
138 ValueRange.of(1, 31, 28); in test_of_longlonglong_smallestmaxminGtMax()
161 ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax); in test_of_longlonglonglong()
186 ValueRange.of(sMin, lMin, sMax, lMax); in test_of_longlonglonglong_invalid()
193 ValueRange test = ValueRange.of(1, 28, 31); in test_isValidValue_long()
206 ValueRange test = ValueRange.of(1, 28, 31); in test_isValidValue_long_int()
[all …]

12345678910>>...15