Search in sources :

Example 31 with Transform

use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.

the class Filters method test_5_lastTwoOut_pseudoMult.

@Test
public void test_5_lastTwoOut_pseudoMult() {
    Values values = createColumn(0, 1, 2, 3, 4);
    values = values.filter(new Object() {

        @Transform
        Integer filter(int i) {
            return i < 2 ? i : null;
        }
    }).pseudoMultiply("a", "b", "c");
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { 0, "a" });
    expected.add(new Object[] { 1, "b" });
    expected.add(new Object[] { 0, "c" });
    ValuesComparison.compare(values, expected);
}
Also used : DataFactory.createValues(com.sun.tck.lib.tgf.DataFactory.createValues) Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) Transform(com.sun.tck.lib.tgf.Transform) Test(org.junit.Test)

Aggregations

Transform (com.sun.tck.lib.tgf.Transform)31 Test (org.junit.Test)31 DataFactory.createValues (com.sun.tck.lib.tgf.DataFactory.createValues)30 Values (com.sun.tck.lib.tgf.Values)30 ArrayList (java.util.ArrayList)30 LeafIterator (com.sun.tck.lib.tgf.LeafIterator)1 TransformingIterator (com.sun.tck.lib.tgf.TransformingIterator)1