Search in sources :

Example 1 with Longs

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());
}
Also used : Longs(com.sun.tck.lib.tgf.data.Longs) Test(org.junit.Test) TestGroup(com.sun.tck.test.TestGroup) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Aggregations

TestResult (com.oracle.tck.lib.autd2.TestResult)1 Longs (com.sun.tck.lib.tgf.data.Longs)1 TestGroup (com.sun.tck.test.TestGroup)1 Test (org.junit.Test)1