< prev index next >

test/java/time/tck/java/time/TCKZoneOffset.java

Print this page
rev 15385 : [mq]: 8164366-ZoneOffset-ofHoursMinutesSeconds-does-not-reject-invalid-input

*** 417,426 **** --- 417,441 ---- @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_hoursTooSmall() { ZoneOffset.ofHoursMinutesSeconds(-19, 0, 0); } + @Test(expectedExceptions=DateTimeException.class) + public void test_factory_int_hours_minutes_seconds_minutesMinValue() { + ZoneOffset.ofHoursMinutesSeconds(0, Integer.MIN_VALUE, -1); + } + + @Test(expectedExceptions=DateTimeException.class) + public void test_factory_int_hours_minutes_seconds_secondsMinValue() { + ZoneOffset.ofHoursMinutesSeconds(0, 0, Integer.MIN_VALUE); + } + + @Test(expectedExceptions=DateTimeException.class) + public void test_factory_int_hours_minutes_seconds_minutesAndSecondsMinValue() { + ZoneOffset.ofHoursMinutesSeconds(0, Integer.MIN_VALUE, Integer.MIN_VALUE); + } + //----------------------------------------------------------------------- @Test public void test_factory_ofTotalSeconds() { assertEquals(ZoneOffset.ofTotalSeconds(60 * 60 + 1), ZoneOffset.ofHoursMinutesSeconds(1, 0, 1)); assertEquals(ZoneOffset.ofTotalSeconds(18 * 60 * 60), ZoneOffset.ofHours(18));
*** 435,444 **** --- 450,464 ---- @Test(expectedExceptions=DateTimeException.class) public void test_factory_ofTotalSeconds_tooSmall() { ZoneOffset.ofTotalSeconds(-18 * 60 * 60 - 1); } + @Test(expectedExceptions=DateTimeException.class) + public void test_factory_ofTotalSeconds_minValue() { + ZoneOffset.ofTotalSeconds(Integer.MIN_VALUE); + } + //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- @Test public void test_factory_CalendricalObject() {
< prev index next >