use of com.sun.tck.test.TestCase 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.sun.tck.test.TestCase 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.sun.tck.test.TestCase 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));
}
use of com.sun.tck.test.TestCase 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));
}
use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class InlinedData method class_2.
@org.junit.Test
public void class_2() {
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(Number.class) Class<?> c) throws Throwable {
list.add(c);
}
}, TU.EMPTY_ARGV);
Assert.assertTrue(status.isOK());
Assert.assertEquals(1, list.size());
Assert.assertEquals(Number.class, list.get(0));
}
Aggregations