Add test cases for HHH-14256

This commit is contained in:
Toby Hammett 2020-10-13 11:55:28 -07:00
parent 8d4de09255
commit 3dc65ef950
5 changed files with 10 additions and 0 deletions

View File

@ -93,6 +93,8 @@ public class InstantTest extends AbstractJavaTimeTypeTest<Instant, InstantTest.E
.add( 1904, 12, 31, 23, 0, 0, 0, ZONE_PARIS )
.add( 1905, 1, 1, 0, 0, 0, 0, ZONE_PARIS )
.add( 1905, 1, 1, 1, 0, 0, 0, ZONE_PARIS )
// => HHH-14256: Instants with negative years
.add(-1, 1, 1, 0, 0, 0, 0, ZoneId.of("UTC"))
.build();
}

View File

@ -82,6 +82,8 @@ public class LocalDateTest extends AbstractJavaTimeTypeTest<LocalDate, LocalDate
.add( 2018, 3, 25, ZONE_PARIS )
.add( 2018, 9, 30, ZONE_AUCKLAND )
.add( 2018, 8, 12, ZONE_SANTIAGO ) // DST start: 00:00 => 01:00
// => HHH-14256: Dates with negative years
.add(-1, 1, 1, ZONE_PARIS)
.build();
}

View File

@ -84,6 +84,8 @@ public class LocalDateTimeTest extends AbstractJavaTimeTypeTest<LocalDateTime, L
// This does not work, but it's unrelated to HHH-13379; see HHH-13515
//.add( 2018, 9, 30, 2, 0, 0, 0, ZONE_AUCKLAND )
.add( 2018, 9, 30, 3, 0, 0, 0, ZONE_AUCKLAND )
// => HHH-14256: Dates with negative years
.add( -1, 1, 1, 0, 0, 0, 0, ZONE_PARIS )
.build();
}

View File

@ -120,6 +120,8 @@ public class OffsetDateTimeTest extends AbstractJavaTimeTypeTest<OffsetDateTime,
.add( 1905, 1, 1, 0, 0, 0, 0, "-01:00", ZONE_PARIS )
.add( 1905, 1, 1, 0, 0, 0, 0, "+00:00", ZONE_PARIS )
.add( 1905, 1, 1, 0, 0, 0, 0, "+01:00", ZONE_PARIS )
// => HHH-14256: Dates with negative years
.add(-1, 1, 1, 0, 0, 0, 0, "+00:00", ZONE_PARIS)
.build();
}

View File

@ -132,6 +132,8 @@ public class ZonedDateTimeTest extends AbstractJavaTimeTypeTest<ZonedDateTime, Z
.add( 1905, 1, 1, 0, 0, 0, 0, "-01:00", ZONE_PARIS )
.add( 1905, 1, 1, 0, 0, 0, 0, "+00:00", ZONE_PARIS )
.add( 1905, 1, 1, 0, 0, 0, 0, "+01:00", ZONE_PARIS )
// => HHH-14256: Dates with negative years
.add(-1, 1, 1, 0, 0, 0, 0, "+00:00", ZONE_PARIS)
.build();
}