use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Intersect method testIntersect_1_7_cache.
@Test
public void testIntersect_1_7_cache() {
Values values_1 = DataFactory.createValues(new Object[][] { { new TestObject("one"), new TestObject("two") }, { new TestObject("three"), new TestObject("four") }, { new TestObject("five"), new TestObject("six") } });
Values result = values_1.intersect(new Object[][] { { new TestObject("one"), new TestObject("two") }, { new TestObject("three_"), new TestObject("three_") } });
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { new TestObject("one"), new TestObject("two") });
ValuesComparison.compare(result.createCache(), expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Intersect method testIntersect_1_5.
@Test
public void testIntersect_1_5() {
Values values_1 = DataFactory.createValues(new Object[][] { { new TestObject("one"), new TestObject("two") }, { new TestObject("three"), new TestObject("three") } });
Values result = values_1.intersect(new Object[][] { { new TestObject("one_"), new TestObject("two_") }, { new TestObject("three_"), new TestObject("three_") } });
List<Object[]> expected = new ArrayList<Object[]>();
ValuesComparison.compare(result, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Mixed method testDiag_Combine_2_3_cached.
@Test
public void testDiag_Combine_2_3_cached() {
Values vs1 = createColumn("a", "b", "c", "d", "e");
Values vs2 = createColumn("x", "y", "z");
Values vs3 = createColumn(1).pseudoMultiply(new TestObject("2"));
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { "a", "x", 1, new TestObject("2") });
expected.add(new Object[] { "b", "y", 1, new TestObject("2") });
expected.add(new Object[] { "c", "z", 1, new TestObject("2") });
expected.add(new Object[] { "d", "x", 1, new TestObject("2") });
expected.add(new Object[] { "e", "y", 1, new TestObject("2") });
ValuesComparison.compare(vs1.pseudoMultiply(vs2).pseudoMultiply(vs3).createCache(), expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Mixed method testDiag_Combine_2_3.
@Test
public void testDiag_Combine_2_3() {
Values vs1 = createColumn("a", "b", "c", "d", "e");
Values vs2 = createColumn("x", "y", "z");
Values vs3 = createColumn(1).pseudoMultiply(new TestObject("2"));
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { "a", "x", 1, new TestObject("2") });
expected.add(new Object[] { "b", "y", 1, new TestObject("2") });
expected.add(new Object[] { "c", "z", 1, new TestObject("2") });
expected.add(new Object[] { "d", "x", 1, new TestObject("2") });
expected.add(new Object[] { "e", "y", 1, new TestObject("2") });
ValuesComparison.compare(vs1.pseudoMultiply(vs2).pseudoMultiply(vs3), expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class MyTest method wrappingTwoDimensionalArray_2.
@Test
public void wrappingTwoDimensionalArray_2() {
final Values result = createColumn("a", "b", "c").filter(new Object() {
@Transform
public TestObject[][] build(String s) {
return new TestObject[][] { { new TestObject(s + 1), new TestObject(s + 2) }, { new TestObject(s + 3), new TestObject(s + 4) } };
}
});
final LinkedList<Object[]> expected = new LinkedList<Object[]>();
expected.add(new Object[] { new TestObject("a1"), new TestObject("a2") });
expected.add(new Object[] { new TestObject("a3"), new TestObject("a4") });
expected.add(new Object[] { new TestObject("b1"), new TestObject("b2") });
expected.add(new Object[] { new TestObject("b3"), new TestObject("b4") });
expected.add(new Object[] { new TestObject("c1"), new TestObject("c2") });
expected.add(new Object[] { new TestObject("c3"), new TestObject("c4") });
ValuesComparison.compare(result, expected);
}
Aggregations