Search in sources :

Example 1 with DataFactory

use of com.sun.tck.lib.tgf.DataFactory in project jtharness by openjdk.

the class Examples method test_05_02_04.

@Test
public void test_05_02_04() {
    @TestGroup
    class TestTransformingIterator {

        Values multiplyValues = DataFactory.createValues(new Comparable<?>[][] { { 1 }, { 3 } }).filter((Values.Transformer1<Object[]>) DataFactory::createRow);

        @TestCase
        @TestData("multiplyValues")
        public void testToString(Integer d) {
        }
    }
    com.oracle.tck.lib.autd2.TestResult s = TU.runTestGroup(new TestTransformingIterator());
    Assert.assertTrue(s.isOK());
    Assert.assertEquals("test cases: 1; all passed", s.getMessage());
}
Also used : Values(com.sun.tck.lib.tgf.Values) TestGroup(com.sun.tck.test.TestGroup) DataFactory(com.sun.tck.lib.tgf.DataFactory) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Example 2 with DataFactory

use of com.sun.tck.lib.tgf.DataFactory in project jtharness by openjdk.

the class Examples method test_08.

@Test
public void test_08() {
    @TestGroup
    class TestTransformingIterator {

        Values multiplyValues = DataFactory.createValues(new Comparable<?>[][] { { 1, 2 }, { 3, 4 } }).filter((Values.Transformer1<Object[]>) DataFactory::createRow);

        @TestCase
        @TestData("multiplyValues")
        public void testToString(Comparable<?> a, Comparable<?> b) {
        }
    }
    com.oracle.tck.lib.autd2.TestResult s = TU.runTestGroup(new TestTransformingIterator());
    Assert.assertTrue(s.isOK());
    Assert.assertEquals("test cases: 1; all passed", s.getMessage());
}
Also used : Values(com.sun.tck.lib.tgf.Values) TestGroup(com.sun.tck.test.TestGroup) DataFactory(com.sun.tck.lib.tgf.DataFactory) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Aggregations

TestResult (com.oracle.tck.lib.autd2.TestResult)2 DataFactory (com.sun.tck.lib.tgf.DataFactory)2 Values (com.sun.tck.lib.tgf.Values)2 TestGroup (com.sun.tck.test.TestGroup)2 Test (org.junit.Test)2