Search in sources :

Example 11 with TestedAPI

use of com.sun.tck.test.TestedAPI in project jtharness by openjdk.

the class FailingSimpleTestCases method testedAPI_packages.

@Test
public void testedAPI_packages() {
    @TestedAPI(testedPackage = { "x.e.r", "s.e.g", "e.t.r" })
    @TestGroup
    class MyTest {

        @TestCase
        @TestedStatement("a statement")
        public void testCase() {
            Assert.fail();
        }
    }
    TestResult s = TU.runTestGroup(new MyTest(), TU.EMPTY_ARGV);
    Assert.assertTrue(!s.isOK());
    Assert.assertEquals("test cases: 1; all failed", s.getMessage());
}
Also used : TestGroup(com.sun.tck.test.TestGroup) TestResult(com.oracle.tck.lib.autd2.TestResult) TestedAPI(com.sun.tck.test.TestedAPI) Test(org.junit.Test)

Aggregations

TestedAPI (com.sun.tck.test.TestedAPI)11 TestResult (com.oracle.tck.lib.autd2.TestResult)10 TestGroup (com.sun.tck.test.TestGroup)10 Test (org.junit.Test)10 ArrayList (java.util.ArrayList)1 StringJoiner (java.util.StringJoiner)1