/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestFractionPrinterParser.java | 62 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 93 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical() 98 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(LocalTime.of(12, 30, 40, 3), buf); in test_print_append() 181 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND… in test_print_nanos() 190 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECON… in test_print_nanos_noDecimalPoint() 246 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse() 248 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse() 254 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).parseUnresolved(… in test_reverseParse_noDecimalPoint() 257 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse_noDecimalPoint() 264 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse_followedByNonDigit() [all …]
|
D | TestDateTimeParsing.java | 66 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 113 .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter(); 160 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantZones_supported() 199 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantNoZone_supported()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKChronoField.java | 80 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 139 {NANO_OF_SECOND, NANOS, SECONDS}, in data_fieldUnit() 185 {NANO_OF_SECOND, false, true}, in data_fieldBased() 223 {NANO_OF_SECOND, LocalTime.of(5, 4, 3, 200), true, 200}, in data_fieldAndAccessor() 224 {NANO_OF_SECOND, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 200}, in data_fieldAndAccessor() 235 {NANO_OF_SECOND, LocalDate.of(2000, 2, 29), false, -1}, in data_fieldAndAccessor()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKDateTimeParseResolver.java | 88 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 175 {YEAR, 2012, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange() 184 {MONTH_OF_YEAR, 5, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange() 214 {HOUR_OF_DAY, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange() 215 {MINUTE_OF_HOUR, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange() 249 {MICRO_OF_SECOND, 12, NANO_OF_SECOND, 12_000L, null, null}, in data_resolveOneToField() 250 {MILLI_OF_SECOND, 12, NANO_OF_SECOND, 12_000_000L, null, null}, in data_resolveOneToField() 435 {SECOND_OF_DAY, 3600 + 650, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)}, in data_resolveTwoToTime() 443 …{MILLI_OF_DAY, (3600 + 650) * 1000L + 2, NANO_OF_SECOND, 2_000_004, LocalTime.of(1, 10, 50, 2_000_… in data_resolveTwoToTime() 451 …{MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, NANO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004)… in data_resolveTwoToTime() [all …]
|
D | TCKDateTimeFormatterBuilder.java | 66 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 808 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows() 815 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_strict_fractionFollows() 821 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_2digit() 828 assertEquals(parsed.getLong(NANO_OF_SECOND), 560_000_000L); in test_adjacent_strict_fractionFollows_2digit() 834 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_0digit() 846 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows() 853 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_lenient_fractionFollows() 859 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows_2digit() 866 assertEquals(parsed.getLong(NANO_OF_SECOND), 560_000_000L); in test_adjacent_lenient_fractionFollows_2digit() [all …]
|
D | TCKDateTimeFormatters.java | 69 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 1228 assertEquals(parsed.getLong(NANO_OF_SECOND), (nano == null ? 0 : nano)); in test_parse_isoInstant() 1306 test.fieldValues.put(NANO_OF_SECOND, (long) nano); in createTime() 1334 test.fieldValues.put(NANO_OF_SECOND, (long) nano); in createDateTime() 1363 mock.fields.put(NANO_OF_SECOND, (long) nano); in buildAccessor() 1390 mock.fields.put(NANO_OF_SECOND, (long) nano); in buildAccessorInstant() 1442 fields.put(NANO_OF_SECOND, (long) dt.getNano()); in setFields()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Instant.java | 71 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 368 int nanoOfSecond = temporal.get(NANO_OF_SECOND); in from() 453 …return field == INSTANT_SECONDS || field == NANO_OF_SECOND || field == MICRO_OF_SECOND || field ==… in isSupported() 555 case NANO_OF_SECOND: return nanos; in get() 592 case NANO_OF_SECOND: return nanos; in getLong() 711 … case NANO_OF_SECOND: return (newValue != nanos ? create(seconds, (int) newValue) : this); in with() 1089 return temporal.with(INSTANT_SECONDS, seconds).with(NANO_OF_SECOND, nanos); in adjustInto()
|
D | LocalTime.java | 68 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 337 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in of() 680 case NANO_OF_SECOND: return nano; in get0() 855 case NANO_OF_SECOND: return withNano((int) newValue); in with() 941 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in withNano()
|
D | Duration.java | 70 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 474 … nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND); in between() 657 NANO_OF_SECOND.checkValidIntValue(nanoOfSecond); in withNanos()
|
D | LocalDateTime.java | 73 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 412 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in ofEpochSecond()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
D | TCKChronoFieldSerialization.java | 80 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 136 {NANO_OF_SECOND}, in data_fieldBased()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKLocalTime.java | 74 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 170 NANO_OF_SECOND, in validFields() 598 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true); in test_isSupported_TemporalField() 663 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); in test_get_TemporalField() 679 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321); in test_getLong_TemporalField() 841 LocalTime test = TEST_12_30_40_987654321.with(NANO_OF_SECOND, i); in test_with_longTemporalField_nanoOfSecond() 842 assertEquals(test.get(NANO_OF_SECOND), i); in test_with_longTemporalField_nanoOfSecond() 866 assertEquals(test.get(NANO_OF_SECOND), i * 1_000); in test_with_longTemporalField_microOfSecond() 891 assertEquals(test.get(NANO_OF_SECOND), i * 1_000_000); in test_with_longTemporalField_milliOfSecond() 918 assertEquals(test.get(NANO_OF_SECOND), TEST_12_30_40_987654321.get(NANO_OF_SECOND)); in test_with_longTemporalField_secondOfMinute() [all …]
|
D | TCKInstant.java | 65 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 144 NANO_OF_SECOND, in validFields() 388 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 123456789); 396 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 123456789); 516 …{Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100), … 517 … {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 0, Instant.ofEpochSecond(10), null}, 523 …{Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 1000000000L, null, DateTimeException.…
|
D | TCKOffsetTime.java | 74 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 161 NANO_OF_SECOND, in validFields() 522 assertEquals(TEST_11_30_59_500_PONE.isSupported(ChronoField.NANO_OF_SECOND), true); 587 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); 600 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321); 783 …assertEquals(test.with(ChronoField.NANO_OF_SECOND, 12345), OffsetTime.of(12, 30, 40, 12345, OFFSET…
|
D | TCKDayOfWeek.java | 168 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
|
D | TCKOffsetDateTime.java | 86 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 180 NANO_OF_SECOND, in validFields() 539 … assertEquals(TEST_2008_6_30_11_30_59_000000500.isSupported(ChronoField.NANO_OF_SECOND), true); 610 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); 629 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
|
D | TCKZonedDateTime.java | 86 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 182 NANO_OF_SECOND, in validFields() 702 return field == INSTANT_SECONDS || field == NANO_OF_SECOND; 865 assertEquals(TEST_DATE_TIME.isSupported(ChronoField.NANO_OF_SECOND), true); 936 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); 955 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
|
D | TCKMonth.java | 160 assertEquals(Month.AUGUST.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
|
D | TCKLocalDateTime.java | 84 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 185 NANO_OF_SECOND, in validFields() 922 … assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true); 993 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); 1010 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
|
D | TCKYear.java | 336 assertEquals(TEST_2008.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
|
D | TCKYearMonth.java | 401 assertEquals(TEST_2008_06.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | YearMonthTest.java | 116 ChronoField.NANO_OF_SECOND, in test_with_TemporalField_long_invalidField()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | JapaneseChronologyTest.java | 111 assertEquals(false, date.isSupported(ChronoField.NANO_OF_SECOND)); in test_JapaneseDate_isSupported_TemporalField()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), enumConstant
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatter.java | 70 import static java.time.temporal.ChronoField.NANO_OF_SECOND; 811 .appendFraction(NANO_OF_SECOND, 0, 9, true)
|