/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKClock_Tick.java | 65 import java.time.Clock; 88 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000_000).toInstant(), PARIS), Duration.ofMil… in test_tick_ClockDuration_250millis() 96 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000).toInstant(), PARIS), Duration.ofNanos(2… in test_tick_ClockDuration_250micros() 104 … Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i).toInstant(), PARIS), Duration.ofNanos(20)); in test_tick_ClockDuration_20nanos() 111 Clock underlying = Clock.system(PARIS); in test_tick_ClockDuration_zeroDuration() 112 Clock test = Clock.tick(underlying, Duration.ZERO); in test_tick_ClockDuration_zeroDuration() 117 Clock underlying = Clock.system(PARIS); in test_tick_ClockDuration_1nsDuration() 118 Clock test = Clock.tick(underlying, Duration.ofNanos(1)); in test_tick_ClockDuration_1nsDuration() 124 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(Long.MAX_VALUE)); in test_tick_ClockDuration_maxDuration() 129 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(0, 123)); in test_tick_ClockDuration_subMilliNotDivisible_123ns() [all …]
|
D | TCKClock_Offset.java | 65 import java.time.Clock; 87 Clock test = Clock.offset(Clock.fixed(INSTANT, PARIS), OFFSET); in test_offset_ClockDuration() 95 Clock underlying = Clock.system(PARIS); in test_offset_ClockDuration_zeroDuration() 96 Clock test = Clock.offset(underlying, Duration.ZERO); in test_offset_ClockDuration_zeroDuration() 102 Clock.offset(null, Duration.ZERO); in test_offset_ClockDuration_nullClock() 107 Clock.offset(Clock.systemUTC(), null); in test_offset_ClockDuration_nullDuration() 112 Clock test = Clock.offset(Clock.system(PARIS), OFFSET); in test_withZone() 113 Clock changed = test.withZone(MOSCOW); in test_withZone() 119 Clock test = Clock.offset(Clock.system(PARIS), OFFSET); in test_withZone_equal() 120 Clock changed = test.withZone(PARIS); in test_withZone_equal() [all …]
|
D | TCKClock_Fixed.java | 65 import java.time.Clock; 85 Clock test = Clock.fixed(INSTANT, PARIS); in test_fixed_InstantZoneId() 93 Clock.fixed(null, PARIS); in test_fixed_InstantZoneId_nullInstant() 98 Clock.fixed(INSTANT, null); in test_fixed_InstantZoneId_nullZoneId() 103 Clock test = Clock.fixed(INSTANT, PARIS); in test_withZone() 104 Clock changed = test.withZone(MOSCOW); in test_withZone() 110 Clock test = Clock.fixed(INSTANT, PARIS); in test_withZone_equal() 111 Clock changed = test.withZone(PARIS); in test_withZone_equal() 117 Clock.fixed(INSTANT, PARIS).withZone(null); in test_withZone_null() 122 Clock a = Clock.fixed(INSTANT, ZoneOffset.UTC); in test_equals() [all …]
|
D | TCKClock.java | 64 import java.time.Clock; 76 static class MockInstantClock extends Clock { 96 public Clock withZone(ZoneId timeZone) { in withZone() 115 private static final Clock MOCK_INSTANT = new MockInstantClock(INSTANT.toEpochMilli(), ZONE); 128 Clock changed = MOCK_INSTANT.withZone(london); in test_mockInstantClock_withZone()
|
D | TCKLocalDate.java | 91 import java.time.Clock; 231 LocalDate expected = LocalDate.now(Clock.systemDefaultZone()); in now() 237 expected = LocalDate.now(Clock.systemDefaultZone()); in now() 254 LocalDate expected = LocalDate.now(Clock.system(zone)); in now_ZoneId() 260 expected = LocalDate.now(Clock.system(zone)); in now_ZoneId() 271 LocalDate.now((Clock) null); in now_Clock_nullClock() 278 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); in now_Clock_allSecsInDay_utc() 290 … Clock clock = Clock.fixed(instant.minusSeconds(OFFSET_PONE.getTotalSeconds()), OFFSET_PONE); 302 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); 313 Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC); [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKClockSerialization.java | 64 import java.time.Clock; 91 assertSerializable(Clock.systemUTC()); in test_systemClockSerializable() 92 assertSerializable(Clock.systemDefaultZone()); in test_systemClockSerializable() 93 assertSerializable(Clock.system(PARIS)); in test_systemClockSerializable() 98 assertSerializable(Clock.offset(Clock.system(PARIS), AMOUNT)); in test_offsetClockSerializable() 103 assertSerializable(Clock.tickSeconds(PARIS)); in test_tickClockSerializable() 104 assertSerializable(Clock.tickMinutes(MOSCOW)); in test_tickClockSerializable() 105 assertSerializable(Clock.tick(Clock.fixed(INSTANT, PARIS), AMOUNT)); in test_tickClockSerializable() 110 assertSerializable(Clock.fixed(INSTANT, ZoneOffset.UTC)); in test_fixedClockSerializable() 111 assertSerializable(Clock.fixed(INSTANT, PARIS)); in test_fixedClockSerializable()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestClock_Offset.java | 65 import java.time.Clock; 82 Clock test = Clock.offset(Clock.system(PARIS), OFFSET); in test_withZone_same() 83 Clock changed = test.withZone(PARIS); in test_withZone_same() 89 Clock test = Clock.offset(Clock.systemUTC(), OFFSET); in test_toString()
|
D | TestClock_Tick.java | 65 import java.time.Clock; 86 Clock test = Clock.tick(Clock.system(PARIS), Duration.ofMillis(500)); in test_withZone_same() 87 Clock changed = test.withZone(PARIS); in test_withZone_same() 93 Clock test = Clock.tick(Clock.systemUTC(), Duration.ofMillis(500)); in test_toString()
|
D | TestClock_System.java | 65 import java.time.Clock; 79 Clock test = Clock.system(PARIS); in test_withZone_same() 80 Clock changed = test.withZone(PARIS); in test_withZone_same() 86 Clock test = Clock.system(PARIS); in test_toString()
|
D | TestClock_Fixed.java | 65 import java.time.Clock; 84 Clock test = Clock.fixed(INSTANT, PARIS); in test_withZone_same() 85 Clock changed = test.withZone(PARIS); in test_withZone_same() 91 Clock test = Clock.fixed(INSTANT, PARIS); in test_toString()
|
D | TestLocalTime.java | 66 import java.time.Clock; 192 LocalTime.now(Clock.systemDefaultZone()); in now() 196 LocalTime expected = LocalTime.now(Clock.systemDefaultZone()); in now()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Clock.java | 134 public abstract class Clock { class 154 public static Clock systemUTC() { in systemUTC() 177 public static Clock systemDefaultZone() { in systemDefaultZone() 196 public static Clock system(ZoneId zone) { in system() 221 public static Clock tickSeconds(ZoneId zone) { in tickSeconds() 244 public static Clock tickMinutes(ZoneId zone) { in tickMinutes() 279 public static Clock tick(Clock baseClock, Duration tickDuration) { in tick() 314 public static Clock fixed(Instant fixedInstant, ZoneId zone) { in fixed() 340 public static Clock offset(Clock baseClock, Duration offsetDuration) { in offset() 353 protected Clock() { in Clock() method in Clock [all …]
|
D | MonthDay.java | 160 return now(Clock.systemDefaultZone()); in now() 176 return now(Clock.system(zone)); in now() 189 public static MonthDay now(Clock clock) { in now()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | MinguoChronology.java | 65 import java.time.Clock; 239 return dateNow(Clock.systemDefaultZone()); in dateNow() 244 return dateNow(Clock.system(zone)); in dateNow() 248 public MinguoDate dateNow(Clock clock) { in dateNow()
|
D | Chronology.java | 64 import java.time.Clock; 386 return dateNow(Clock.systemDefaultZone()); in dateNow() 406 return dateNow(Clock.system(zone)); in dateNow() 423 default ChronoLocalDate dateNow(Clock clock) { in dateNow()
|
D | ThaiBuddhistChronology.java | 65 import java.time.Clock; 275 return dateNow(Clock.systemDefaultZone()); in dateNow() 280 return dateNow(Clock.system(zone)); in dateNow() 284 public ThaiBuddhistDate dateNow(Clock clock) { in dateNow()
|
D | ThaiBuddhistDate.java | 70 import java.time.Clock; 127 return now(Clock.systemDefaultZone()); in now() 143 return now(Clock.system(zone)); in now() 157 public static ThaiBuddhistDate now(Clock clock) { in now()
|
D | MinguoDate.java | 70 import java.time.Clock; 127 return now(Clock.systemDefaultZone()); in now() 143 return now(Clock.system(zone)); in now() 157 public static MinguoDate now(Clock clock) { in now()
|
D | IsoChronology.java | 74 import java.time.Clock; 324 return dateNow(Clock.systemDefaultZone()); in dateNow() 341 return dateNow(Clock.system(zone)); in dateNow() 356 public LocalDate dateNow(Clock clock) { in dateNow()
|
D | JapaneseChronology.java | 71 import java.time.Clock; 295 return dateNow(Clock.systemDefaultZone()); in dateNow() 300 return dateNow(Clock.system(zone)); in dateNow() 304 public JapaneseDate dateNow(Clock clock) { in dateNow()
|
D | HijrahDate.java | 73 import java.time.Clock; 177 return now(Clock.systemDefaultZone()); in now() 194 return now(Clock.system(zone)); in now() 209 public static HijrahDate now(Clock clock) { in now()
|
D | JapaneseDate.java | 73 import java.time.Clock; 160 return now(Clock.systemDefaultZone()); in now() 176 return now(Clock.system(zone)); in now() 190 public static JapaneseDate now(Clock clock) { in now()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKHijrahChronology.java | 59 import java.time.Clock; 110 … assertEquals(HijrahChronology.INSTANCE.dateNow(), HijrahDate.now(Clock.systemDefaultZone())) ; in test_dateNow() 111 …assertEquals(HijrahChronology.INSTANCE.dateNow(), HijrahDate.now(Clock.systemDefaultZone().getZone… in test_dateNow() 114 …assertEquals(HijrahChronology.INSTANCE.dateNow(), HijrahChronology.INSTANCE.dateNow(Clock.systemDe… in test_dateNow() 115 …assertEquals(HijrahChronology.INSTANCE.dateNow(), HijrahChronology.INSTANCE.dateNow(Clock.systemDe… in test_dateNow() 118 …jrahChronology.INSTANCE.dateNow(zoneId), HijrahChronology.INSTANCE.dateNow(Clock.system(zoneId))) ; in test_dateNow() 119 …rahChronology.INSTANCE.dateNow(zoneId), HijrahChronology.INSTANCE.dateNow(Clock.system(zoneId).get… in test_dateNow() 120 … assertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahDate.now(Clock.system(zoneId))) ; in test_dateNow() 121 …assertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahDate.now(Clock.system(zoneId).getZon… in test_dateNow() 123 …dateNow(ZoneId.of(ZoneOffset.UTC.getId())), HijrahChronology.INSTANCE.dateNow(Clock.systemUTC())) ; in test_dateNow()
|
D | TCKThaiBuddhistChronology.java | 70 import java.time.Clock; 226 …assertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(), ThaiBuddhistDate.now(Clock.systemDefaultZo… in test_dateNow() 227 …assertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(), ThaiBuddhistDate.now(Clock.systemDefaultZo… in test_dateNow() 230 …istChronology.INSTANCE.dateNow(), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.systemDefaultZone(… in test_dateNow() 231 …istChronology.INSTANCE.dateNow(), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.systemDefaultZone(… in test_dateNow() 234 …ronology.INSTANCE.dateNow(zoneId), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.system(zoneId))) ; in test_dateNow() 235 …onology.INSTANCE.dateNow(zoneId), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.system(zoneId).get… in test_dateNow() 236 …assertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistDate.now(Clock.system(zo… in test_dateNow() 237 …assertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistDate.now(Clock.system(zo… in test_dateNow() 239 …w(ZoneId.of(ZoneOffset.UTC.getId())), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.systemUTC())) ; in test_dateNow()
|
D | TCKMinguoChronology.java | 65 import java.time.Clock; 189 … assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone())) ; in test_dateNow() 190 …assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone().getZone… in test_dateNow() 193 …assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDe… in test_dateNow() 194 …assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDe… in test_dateNow() 197 …nguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId))) ; in test_dateNow() 198 …guoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId).get… in test_dateNow() 199 … assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId))) ; in test_dateNow() 200 …assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId).getZon… in test_dateNow() 202 …dateNow(ZoneId.of(ZoneOffset.UTC.getId())), MinguoChronology.INSTANCE.dateNow(Clock.systemUTC())) ; in test_dateNow()
|