use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class TestPureAssert method testAssertSame_Positive_message_exception.
@Test
public void testAssertSame_Positive_message_exception() {
TestObject testObject = new TestObject(RANDOM_STRING);
com.sun.tck.lib.Assert.assertSame(testObject, testObject, "3490275092375", new IllegalAccessException());
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class TestPureAssert method testAssertEquals_Positive_sameObject_message.
@Test
public void testAssertEquals_Positive_sameObject_message() {
TestObject testObject = new TestObject("object" + RANDOM_STRING);
com.sun.tck.lib.Assert.assertEquals(testObject, testObject, "12312123123");
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class MyTest method wrappingIterator_2.
@Test
public void wrappingIterator_2() {
final Values result = createColumn("1", "2", "3").filter(new Object() {
@Transform
public Iterator<TestObject> build(String s) {
return Arrays.asList(new TestObject(s), new TestObject(s + s), new TestObject(s + s + s)).iterator();
}
});
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 Cache method test_3.
@Test
public void test_3() {
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");
}
}, new AbstractValue<Object>() {
public Object create() {
return new TestObject("x");
}
}).multiply(1, 2, 3, 4, 5, 6, 7, 8, 9).multiply(89, 45, 23, 78);
ValuesComparison.checkCachedReturnsTheSame(values);
}
use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.
the class Cache method test_2.
@Test
public void test_2() {
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");
}
});
final Values cache = values.createCache();
final Object[] result = ValuesComparison.createArray(cache);
List<Object[]> expectedList = new ArrayList<Object[]>();
expectedList.add(new Object[] { new TestObject("a") });
expectedList.add(new Object[] { new TestObject("b") });
expectedList.add(new Object[] { new TestObject("c") });
final Object[] expected = expectedList.toArray();
Assert.assertArrayEquals(expected, result);
}
Aggregations