Search in sources :

Example 6 with TestGroup

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

the class Examples method test_05_04.

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

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

        @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) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Example 7 with TestGroup

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

the class Examples method test_05_02_01.

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

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

        @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) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Example 8 with TestGroup

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

the class Examples method test_03_array_01_old_approach_twoArrays.

@Test
public void test_03_array_01_old_approach_twoArrays() {
    @TestGroup
    class Test {

        Values mix = createColumn(new Color[] { BLACK, BLACK, RED, ORANGE }, new Color[] { BLUE }, new Color[] { BLUE }, new Color[] { RED, WHITE }).multiply(new Color[] { BLACK, BLACK, RED, ORANGE }, new Color[] { BLUE }, new Color[] { BLUE }, new Color[] { RED, WHITE }).filter(new Object() {

            @Transform
            Values t(Color[] c1s, Color[] c2s) {
                return createRow(c1s[0].getBlue() + c2s[0].getRed());
            }
        });

        @TestCase
        @TestData("mix")
        public void test(int mix) {
            assertTrue(mix >= 0);
        }
    }
    com.oracle.tck.lib.autd2.TestResult s = TU.runTestGroup(new Test());
    Assert.assertTrue(s.isOK());
    Assert.assertEquals("test cases: 1; all passed", s.getMessage());
}
Also used : Test(org.junit.Test) Color(java.awt.Color) Values(com.sun.tck.lib.tgf.Values) TestGroup(com.sun.tck.test.TestGroup) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Example 9 with TestGroup

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

the class Examples method test_05_01.

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

        Values multiplyValues = DataFactory.createValues(new Comparable<?>[][] { { 1, 2 }, { 3, 4 } }).multiply(DataFactory.createValues(new Comparable<?>[][] { { 5, 6 }, { 7, 8 } })).filter((Object[] i) -> DataFactory.createRow(i));

        @TestCase
        @TestData("multiplyValues")
        public void testToString(Comparable<?> a, Comparable<?> b, Comparable<?> c, Comparable<?> d) {
            System.out.println("TestTransformingIterator.testToString");
        }
    }
    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) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Example 10 with TestGroup

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

the class Examples method test_05_02.

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

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

        @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) TestResult(com.oracle.tck.lib.autd2.TestResult) Test(org.junit.Test)

Aggregations

TestGroup (com.sun.tck.test.TestGroup)55 Test (org.junit.Test)53 TestResult (com.oracle.tck.lib.autd2.TestResult)49 Values (com.sun.tck.lib.tgf.Values)27 TestedAPI (com.sun.tck.test.TestedAPI)10 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)10 TestData (com.sun.tck.lib.tgf.TestData)7 Color (java.awt.Color)7 BaseTestGroup (com.oracle.tck.lib.autd2.unittests.BaseTestGroup)4 DataFactory (com.sun.tck.lib.tgf.DataFactory)4 Longs (com.sun.tck.lib.tgf.data.Longs)3 ColorSpace (java.awt.color.ColorSpace)3 Iterator (java.util.Iterator)3 List (java.util.List)3 RandomAccess (java.util.RandomAccess)3 Collectors.toList (java.util.stream.Collectors.toList)3 Assert.assertEquals (com.sun.tck.lib.Assert.assertEquals)2 Assert.assertTrue (com.sun.tck.lib.Assert.assertTrue)2 ExpectedExceptions (com.sun.tck.lib.ExpectedExceptions)2 DataFactory.createColumn (com.sun.tck.lib.tgf.DataFactory.createColumn)2