use of com.oracle.tck.lib.autd2.unittests.BaseTestGroup in project jtharness by openjdk.
the class InlinedData method bool_1.
@org.junit.Test
public void bool_1() {
final List<Boolean> list = new ArrayList<Boolean>();
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
@TestCase
public void test(@Booleans({ true, false, false, false }) boolean b) throws Throwable {
list.add(b);
}
}, TU.EMPTY_ARGV);
Assert.assertTrue(status.isOK());
Assert.assertEquals(4, list.size());
Assert.assertEquals(true, list.get(0));
Assert.assertEquals(false, list.get(1));
Assert.assertEquals(false, list.get(2));
Assert.assertEquals(false, list.get(3));
}
use of com.oracle.tck.lib.autd2.unittests.BaseTestGroup 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));
}
use of com.oracle.tck.lib.autd2.unittests.BaseTestGroup 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);
}
use of com.oracle.tck.lib.autd2.unittests.BaseTestGroup 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);
}
use of com.oracle.tck.lib.autd2.unittests.BaseTestGroup 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));
}
Aggregations