use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class MyTest method wrappingOneDimensionalArray_2.
@Test
public void wrappingOneDimensionalArray_2() {
final Values result = createColumn("1", "2", "3").filter(new Object() {
@Transform
public TestObject[] build(String s) {
return new TestObject[] { new TestObject(s), new TestObject(s + s), new TestObject(s + s + s) };
}
});
final LinkedList<Object[]> expected = new LinkedList<Object[]>();
expected.add(new Object[] { new TestObject("1") });
expected.add(new Object[] { new TestObject("11") });
expected.add(new Object[] { new TestObject("111") });
expected.add(new Object[] { new TestObject("2") });
expected.add(new Object[] { new TestObject("22") });
expected.add(new Object[] { new TestObject("222") });
expected.add(new Object[] { new TestObject("3") });
expected.add(new Object[] { new TestObject("33") });
expected.add(new Object[] { new TestObject("333") });
ValuesComparison.compare(result, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class MyTest method notValuesReturned_2.
@Test
public void notValuesReturned_2() {
final Values result = createColumn("1", "2", "3").filter(new Object() {
@Transform
public TestObject build(String s) {
return new TestObject(s);
}
});
final LinkedList<Object[]> expected = new LinkedList<Object[]>();
expected.add(new Object[] { new TestObject("1") });
expected.add(new Object[] { new TestObject("2") });
expected.add(new Object[] { new TestObject("3") });
ValuesComparison.compare(result, expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class MyTest method wrappingList_2.
@Test
public void wrappingList_2() {
final Values result = createColumn("1", "2", "3").filter(new Object() {
@Transform
public List<TestObject> build(String s) {
return Arrays.asList(new TestObject(s), new TestObject(s + s), new TestObject(s + s + s));
}
});
final LinkedList<Object[]> expected = new LinkedList<Object[]>();
expected.add(new Object[] { new TestObject("1") });
expected.add(new Object[] { new TestObject("11") });
expected.add(new Object[] { new TestObject("111") });
expected.add(new Object[] { new TestObject("2") });
expected.add(new Object[] { new TestObject("22") });
expected.add(new Object[] { new TestObject("222") });
expected.add(new Object[] { new TestObject("3") });
expected.add(new Object[] { new TestObject("33") });
expected.add(new Object[] { new TestObject("333") });
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_2.
@Test
public void testDiag_Combine_2_2() {
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).multiply(vs3), expected);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class TestPureAssert method testAssertEquals_Negative_Message_custom.
@Test
public void testAssertEquals_Negative_Message_custom() {
TestObject testObject_1 = new TestObject("1" + RANDOM_STRING);
TestObject testObject_2 = new TestObject("2" + RANDOM_STRING);
try {
com.sun.tck.lib.Assert.assertEquals(testObject_1, testObject_2, "MyMessage" + RANDOM_STRING);
fail("Exception not thrown");
} catch (AssertionFailedException e) {
assertEquals("MyMessage" + RANDOM_STRING + "\n" + "Expected equal to : \"" + testObject_1 + "\", was given: \"" + testObject_2 + "\"", e.getMessage());
}
}
Aggregations