use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Cache method test_1.
@Test
public void test_1() {
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");
}
}).createCache();
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 Constructors method testConstructor_TwoDim_2.
@Test
public void testConstructor_TwoDim_2() {
Values values = DataFactory.createValues(new TestObject[][] { { new TestObject("a"), new TestObject("b") }, { new TestObject("b"), new TestObject("c") }, { new TestObject("e"), new TestObject("d") }, { new TestObject("x"), new TestObject("y") } });
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new TestObject[] { new TestObject("a"), new TestObject("b") });
expected.add(new TestObject[] { new TestObject("b"), new TestObject("c") });
expected.add(new TestObject[] { new TestObject("e"), new TestObject("d") });
expected.add(new TestObject[] { new TestObject("x"), new TestObject("y") });
ValuesComparison.compare(values, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Constructors method testConstructor_Column_4.
@Test
public void testConstructor_Column_4() {
final String s1 = TU.generateRandomString();
final String s2 = TU.generateRandomString();
final String s3 = TU.generateRandomString();
Values values = DataFactory.createColumn(new TestObject(s1), new TestObject(s2), new TestObject(s3));
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { new TestObject(s1) });
expected.add(new Object[] { new TestObject(s2) });
expected.add(new Object[] { new TestObject(s3) });
ValuesComparison.compare(values, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Constructors method testConstructor_Column_3.
@Test
public void testConstructor_Column_3() {
final String s = TU.generateRandomString();
Values values = DataFactory.createColumn(new TestObject(s + "suff"));
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { new TestObject(s + "suff") });
ValuesComparison.compare(values, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Constructors method testConstructor_Row_1.
@Test
public void testConstructor_Row_1() {
final String s1 = TU.generateRandomString();
final String s2 = TU.generateRandomString();
final String s3 = TU.generateRandomString();
Values values = DataFactory.createRow(new TestObject(s1), new TestObject(s2), new TestObject(s3));
List<Object[]> expected = new ArrayList<Object[]>();
expected.add(new Object[] { new TestObject(s1), new TestObject(s2), new TestObject(s3) });
ValuesComparison.compare(values, expected);
}
Aggregations