use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Mixed method testDiag_Combine_2_1.
@Test
public void testDiag_Combine_2_1() {
Values vs1 = createColumn("a", "b", "c", "d", "e");
Values vs2 = createColumn("x", "y", "z");
Values vs3 = createColumn(1);
Values vs4 = createColumn(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).multiply(vs3).pseudoMultiply(vs4), expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Cache method runTest.
private long runTest(final Values column, boolean createCache) {
final long start = System.currentTimeMillis();
final Values dataToUse = createCache ? column.createCache() : column;
TU.runTestGroup(new BaseTestGroup() {
Values setup() {
return dataToUse.multiply(dataToUse);
}
@TestCase
@TestData("setup")
public void theTest(TestObject t1, TestObject t2) {
}
});
return System.currentTimeMillis() - start;
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Constructors method test_LazyInitialization.
@Test
public void test_LazyInitialization() {
Values values = DataFactory.createColumn(new AbstractValue<Object>() {
public Object create() {
return new TestObject("a");
}
}, new AbstractValue<Object>() {
public Object create() {
return new TestObject("b");
}
}, new AbstractValue<Object>() {
public Object create() {
return new TestObject("c");
}
});
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { new TestObject("a") });
expected.add(new Object[] { new TestObject("b") });
expected.add(new Object[] { new TestObject("c") });
ValuesComparison.compare(values, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Intersect method testIntersect_1_7.
@Test
public void testIntersect_1_7() {
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, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Intersect method testIntersect_1_6.
@Test
public void testIntersect_1_6() {
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[]>();
expected.add(new Object[] { new TestObject("one"), new TestObject("two") });
ValuesComparison.compare(result, expected);
}
Aggregations