use of com.sun.tck.lib.tgf.DataFactory.createValues in project jtharness by openjdk.
the class Filtering method returningArrayUntouched.
@Test
public void returningArrayUntouched() {
final java.util.List<Integer[]> passed = new ArrayList<Integer[]>();
com.oracle.tck.lib.autd2.TestResult status = com.oracle.tck.lib.autd2.unittests.TU.runTestGroup(new BaseTestGroup() {
private Values values() {
return createColumn(0, 1, 2).filter(new Object() {
@Transform
Values create(int i) {
return DataFactory.createValues(new Object[][] { { new Integer[] { i, i + 1, i + 2 } } });
}
});
}
@TestCase
@TestData("values")
public void test(Integer[] integer) throws Throwable {
passed.add(integer);
}
}, TU.EMPTY_ARGV);
assertEquals(3, passed.size());
assertArrayEquals(new Integer[] { 0, 1, 2 }, passed.get(0));
assertArrayEquals(new Integer[] { 1, 2, 3 }, passed.get(1));
assertArrayEquals(new Integer[] { 2, 3, 4 }, passed.get(2));
assertTrue(status.isOK());
}
Aggregations