Search in sources :

Example 76 with com.oracle.tck.lib.autd2

use of com.oracle.tck.lib.autd2 in project jtharness by openjdk.

the class InlinedData method strings_1_1.

@org.junit.Test
public void strings_1_1() {
    final List<String> list = new ArrayList<String>();
    com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {

        @TestCase
        public void test(@Strings({ "a", "b", "c" }) String s) throws Throwable {
            list.add(s);
        }
    }, TU.EMPTY_ARGV);
    Assert.assertTrue(status.isOK());
    Assert.assertEquals(3, list.size());
    Assert.assertEquals("a", list.get(0));
    Assert.assertEquals("b", list.get(1));
    Assert.assertEquals("c", list.get(2));
}
Also used : TestCase(com.sun.tck.test.TestCase) ArrayList(java.util.ArrayList) BaseTestGroup(com.oracle.tck.lib.autd2.unittests.BaseTestGroup)

Example 77 with com.oracle.tck.lib.autd2

use of com.oracle.tck.lib.autd2 in project jtharness by openjdk.

the class InlinedData method double_1.

@org.junit.Test
public void double_1() {
    final List<Double> list = new ArrayList<Double>();
    com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {

        @TestCase
        public void test(@Doubles({ 45.56, 7.7, 1.1 }) Double s) throws Throwable {
            list.add(s);
        }
    }, TU.EMPTY_ARGV);
    Assert.assertTrue(status.isOK());
    Assert.assertEquals(3, list.size());
    Assert.assertEquals(45.56, list.get(0), 0.0);
    Assert.assertEquals(7.7, list.get(1), 0.0);
    Assert.assertEquals(1.1, list.get(2), 0.0);
}
Also used : TestCase(com.sun.tck.test.TestCase) ArrayList(java.util.ArrayList) BaseTestGroup(com.oracle.tck.lib.autd2.unittests.BaseTestGroup)

Example 78 with com.oracle.tck.lib.autd2

use of com.oracle.tck.lib.autd2 in project jtharness by openjdk.

the class InlinedData method chars_1.

@org.junit.Test
public void chars_1() {
    final List<Character> list = new ArrayList<Character>();
    com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {

        @TestCase
        public void test(@Chars({ 28, 1 }) char c) throws Throwable {
            list.add(c);
        }
    }, TU.EMPTY_ARGV);
    Assert.assertTrue(status.isOK());
    Assert.assertEquals(2, list.size());
    Assert.assertEquals(28, list.get(0), 0.0);
    Assert.assertEquals(1, list.get(1), 0.0);
}
Also used : TestCase(com.sun.tck.test.TestCase) ArrayList(java.util.ArrayList) BaseTestGroup(com.oracle.tck.lib.autd2.unittests.BaseTestGroup)

Example 79 with com.oracle.tck.lib.autd2

use of com.oracle.tck.lib.autd2 in project jtharness by openjdk.

the class InlinedData method class_1.

@org.junit.Test
public void class_1() {
    final List<Class<?>> list = new ArrayList<Class<?>>();
    com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {

        @TestCase
        public void test(@Classes({ String.class, Throwable.class }) Class<?> c) throws Throwable {
            list.add(c);
        }
    }, TU.EMPTY_ARGV);
    Assert.assertTrue(status.isOK());
    Assert.assertEquals(2, list.size());
    Assert.assertEquals(String.class, list.get(0));
    Assert.assertEquals(Throwable.class, list.get(1));
}
Also used : TestCase(com.sun.tck.test.TestCase) ArrayList(java.util.ArrayList) BaseTestGroup(com.oracle.tck.lib.autd2.unittests.BaseTestGroup)

Example 80 with com.oracle.tck.lib.autd2

use of com.oracle.tck.lib.autd2 in project jtharness by openjdk.

the class InlinedData method strings_2.

@org.junit.Test
public void strings_2() {
    final List<String> list = new ArrayList<String>();
    com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {

        @TestCase
        public void test(@Strings("34563456435634645631324") String s) throws Throwable {
            list.add(s);
        }
    }, TU.EMPTY_ARGV);
    Assert.assertTrue(status.isOK());
    Assert.assertEquals(1, list.size());
    Assert.assertEquals("34563456435634645631324", list.get(0));
}
Also used : TestCase(com.sun.tck.test.TestCase) ArrayList(java.util.ArrayList) BaseTestGroup(com.oracle.tck.lib.autd2.unittests.BaseTestGroup)

Aggregations

TestCase (com.sun.tck.test.TestCase)139 BaseTestGroup (com.oracle.tck.lib.autd2.unittests.BaseTestGroup)135 Test (org.junit.Test)107 ArrayList (java.util.ArrayList)73 TestData (com.sun.tck.lib.tgf.TestData)61 TestResult (com.oracle.tck.lib.autd2.TestResult)52 Values (com.sun.tck.lib.tgf.Values)50 TestGroup (com.sun.tck.test.TestGroup)30 HashSet (java.util.HashSet)13 DataFactory.createValues (com.sun.tck.lib.tgf.DataFactory.createValues)12 NonTestCase (com.oracle.tck.lib.autd2.NonTestCase)11 Operation (com.sun.tck.lib.tgf.data.Operation)10 TestObject (com.oracle.tck.lib.autd2.unittests.TestObject)8 Color (java.awt.Color)7 List (java.util.List)5 DataFactory (com.sun.tck.lib.tgf.DataFactory)4 DataFactory.createColumn (com.sun.tck.lib.tgf.DataFactory.createColumn)3 DataFactory.createRow (com.sun.tck.lib.tgf.DataFactory.createRow)3 PrintWriter (java.io.PrintWriter)3 java.util (java.util)3