use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class Filtering method arrayReturned_01_lambda.
@Test
public void arrayReturned_01_lambda() {
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
private Values values() {
Values values = createColumn(0, 1, 2).filter((Integer i) -> new Integer[] { i, i + 1, i + 2 });
return createColumn("a", "b", "c").pseudoMultiply(values);
}
@TestCase
@TestData("values")
public void wrongTest(String s, Integer integer) throws Throwable {
System.out.println("s = " + s);
System.out.println("integers = " + integer);
}
}, TU.EMPTY_ARGV);
assertTrue(status.isOK());
}
use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class Filtering method arrayReturned_02_lambda.
@Test
public void arrayReturned_02_lambda() {
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
private Values values() {
Values values = createColumn(0, 1, 2).filter((Integer i) -> new Integer[][] { { i, i + 1 }, { i, i + 2 }, { i, i + 20 } });
return createColumn("a", "b", "c").pseudoMultiply(values);
}
@TestCase
@TestData("values")
public void wrongTest(String s, Integer integer1, Integer integer2) throws Throwable {
System.out.println("s = " + s);
System.out.println("integer1 = " + integer1);
System.out.println("integer2 = " + integer2);
}
}, TU.EMPTY_ARGV);
assertTrue(status.isOK());
}
use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class Filtering method listReturned_01.
@Test
public void listReturned_01() {
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
private Values values() {
Values values = createColumn(0, 1, 2).filter(new Object() {
@Transform
java.util.List<Integer> create(int i) {
return Arrays.asList(i, i + 1, i + 2);
}
});
return createColumn("a", "b", "c").pseudoMultiply(values);
}
@TestCase
@TestData("values")
public void wrongTest(String s, Integer integer) throws Throwable {
System.out.println("s = " + s);
System.out.println("integers = " + integer);
}
}, TU.EMPTY_ARGV);
assertTrue(status.isOK());
}
use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class MyTest method testRun_DataFilteredOutCompletely.
@Test
public void testRun_DataFilteredOutCompletely() {
final ArrayList<String> arrayList = new ArrayList<String>();
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
Values setupOne() {
return createColumn(1, 2).filter(new Object() {
@Transform
String filterOut(int i) {
return "a";
}
}).multiply().filter(new Object() {
@Transform
String end(String s) {
return null;
}
});
}
@TestCase
@TestData("setupOne")
public void myTest(String s) {
arrayList.add(s);
}
}, TU.EMPTY_ARGV);
Assert.assertEquals(0, arrayList.size());
Assert.assertTrue(status.isOK());
Assert.assertEquals("Passed. test cases: 1; all passed", status.toString());
}
use of com.sun.tck.test.TestCase in project jtharness by openjdk.
the class MyTest method testRun_Data_partlyFilteredInTheEnd.
@Test
public void testRun_Data_partlyFilteredInTheEnd() {
final ArrayList<String> arrayList = new ArrayList<String>();
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
Values setupOne() {
return createColumn(1, 2).filter(new Object() {
@Transform
String filterOut(int i) {
return "a";
}
}).multiply(createColumn("a", "b", "d").filter(new Object() {
@Transform
String end(String s) {
return null;
}
}));
}
@TestCase
@TestData("setupOne")
public void myTest(String s1, String s2, String s3, String s4) {
arrayList.add(s1);
}
}, TU.EMPTY_ARGV);
Assert.assertEquals(0, arrayList.size());
Assert.assertTrue(status.isOK());
Assert.assertEquals("Passed. test cases: 1; all passed", status.toString());
}
Aggregations