use of com.sun.tck.lib.tgf.data.Longs in project jtharness by openjdk.
the class Examples method test_01.
@Test
public void test_01() {
@TestGroup
class Test {
@TestCase
@ExpectedExceptions(ArithmeticException.class)
public void test(@Longs({ 2L, 3L, 1000L, Long.MAX_VALUE }) long y) {
Math.multiplyExact(Long.MAX_VALUE, y);
}
}
TestResult testResult = TU.runTestGroup(new Test());
Assert.assertTrue(testResult.isOK());
Assert.assertEquals("test cases: 1; all passed", testResult.getMessage());
}
Aggregations