use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.
the class Filters method test_7_lastOut.
@Test
public void test_7_lastOut() {
Values values = createColumn(0, 1, 2).filter(new Object() {
@Transform
Integer filter(int i) {
return i != 2 ? i : null;
}
});
values = createColumn("a", "b", "c").multiply(values);
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { "a", 0 });
expected.add(new Object[] { "a", 1 });
expected.add(new Object[] { "b", 0 });
expected.add(new Object[] { "b", 1 });
expected.add(new Object[] { "c", 0 });
expected.add(new Object[] { "c", 1 });
ValuesComparison.compare(values, expected);
}
use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.
the class Filters method test_nothingLeft_createCache.
@Test
public void test_nothingLeft_createCache() {
Values values = createColumn(0, 1, 2);
values = values.filter(new Object() {
@Transform
Integer filter(int i) {
return null;
}
}).createCache();
List<Object[]> expected = new ArrayList<Object[]>();
ValuesComparison.compare(values, expected);
}
use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.
the class Filters method test_5_firstOut_intersect.
@Test
public void test_5_firstOut_intersect() {
Values values = createColumn(0, 1, 2);
values = values.filter(new Object() {
@Transform
Integer filter(int i) {
return i != 0 ? i : null;
}
}).intersect(0, 4, 6, 1, 8, 9, 2);
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { 1 });
expected.add(new Object[] { 2 });
ValuesComparison.compare(values, expected);
}
use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.
the class Filters method test_6_secondOut.
@Test
public void test_6_secondOut() {
Values values = createColumn(0, 1, 2).filter(new Object() {
@Transform
Integer filter(int i) {
return i != 1 ? i : null;
}
});
values = createColumn("a", "b", "c").multiply(values);
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { "a", 0 });
expected.add(new Object[] { "a", 2 });
expected.add(new Object[] { "b", 0 });
expected.add(new Object[] { "b", 2 });
expected.add(new Object[] { "c", 0 });
expected.add(new Object[] { "c", 2 });
ValuesComparison.compare(values, expected);
}
use of com.sun.tck.lib.tgf.Transform in project jtharness by openjdk.
the class Filters method test_nothingLeft_middle.
@Test
public void test_nothingLeft_middle() {
Values values = createColumn(0, 1, 2);
values = values.filter(new Object() {
@Transform
Integer filter(int i) {
return null;
}
}).filter(new Object() {
@Transform
Integer filter() {
return 2;
}
});
List<Object[]> expected = new ArrayList<Object[]>();
ValuesComparison.compare(values, expected);
}
Aggregations