use of java.time.Period in project jdk8u_jdk by JetBrains.
the class TCKPeriod method test_plusMonths_overflowTooBig.
@Test(expectedExceptions = ArithmeticException.class)
public void test_plusMonths_overflowTooBig() {
Period test = Period.ofMonths(Integer.MAX_VALUE);
test.plusMonths(1);
}
use of java.time.Period in project jdk8u_jdk by JetBrains.
the class TCKPeriod method test_equals_null.
public void test_equals_null() {
Period test = Period.of(1, 2, 3);
assertEquals(test.equals(null), false);
}
use of java.time.Period in project jdk8u_jdk by JetBrains.
the class TCKPeriod method test_multipliedBy_overflowTooSmall.
@Test(expectedExceptions = ArithmeticException.class)
public void test_multipliedBy_overflowTooSmall() {
Period test = Period.ofYears(Integer.MIN_VALUE / 2 - 1);
test.multipliedBy(2);
}
use of java.time.Period in project jdk8u_jdk by JetBrains.
the class TCKPeriod method test_plusYears_overflowTooBig.
@Test(expectedExceptions = ArithmeticException.class)
public void test_plusYears_overflowTooBig() {
Period test = Period.ofYears(Integer.MAX_VALUE);
test.plusYears(1);
}
use of java.time.Period in project jdk8u_jdk by JetBrains.
the class TCKPeriod method test_plusDays_overflowTooSmall.
@Test(expectedExceptions = ArithmeticException.class)
public void test_plusDays_overflowTooSmall() {
Period test = Period.ofDays(Integer.MIN_VALUE);
test.plusDays(-1);
}
Aggregations