Search in sources :

Example 26 with TestObject

use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.

the class Constructors method testConstructor_Row_2.

@Test
public void testConstructor_Row_2() {
    final String s1 = TU.generateRandomString();
    Values values = DataFactory.createRow(new TestObject(s1));
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { new TestObject(s1) });
    ValuesComparison.compare(values, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 27 with TestObject

use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.

the class Constructors method testConstructor_Row_4.

@Test
public void testConstructor_Row_4() {
    Values values = DataFactory.createRow(567, "a", "c", "b", "c_", new TestObject("x"));
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { 567, "a", "c", "b", "c_", new TestObject("x") });
    ValuesComparison.compare(values, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 28 with TestObject

use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.

the class Intersect method testIntersect_1_2.

@Test
public void testIntersect_1_2() {
    Values values_1 = DataFactory.createColumn(new TestObject("one"), new TestObject("two"), new TestObject("three"));
    Values values_2 = DataFactory.createColumn(new TestObject("five"), new TestObject("six"), new TestObject("seven"));
    List<Object[]> expected = new ArrayList<Object[]>();
    Values result = values_1.intersect(values_2);
    ValuesComparison.compare(result, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 29 with TestObject

use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.

the class Intersect method testIntersect_1_8.

@Test
public void testIntersect_1_8() {
    Values values_1 = DataFactory.createColumn(new TestObject("one"), new TestObject("two"), new TestObject("three"), new TestObject("four")).pseudoMultiply(new TestObject("five"), new TestObject("six"), new TestObject("seven"), new TestObject("eight"));
    Values result = values_1.intersect(new Object[][] { { new TestObject("two"), new TestObject("six") }, { new TestObject("open"), new TestObject("closed") }, { new TestObject("one"), new TestObject("five") } });
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { new TestObject("one"), new TestObject("five") });
    expected.add(new Object[] { new TestObject("two"), new TestObject("six") });
    ValuesComparison.compare(result, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 30 with TestObject

use of com.oracle.tck.lib.autd2.unittests.TestObject in project jtharness by openjdk.

the class Intersect method testIntersect_1_1.

@Test
public void testIntersect_1_1() {
    Values values_1 = DataFactory.createColumn(new TestObject("one"), new TestObject("two"), new TestObject("three"));
    Values values_2 = DataFactory.createColumn(new TestObject("three"), new TestObject("four"), new TestObject("one"));
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { new TestObject("one") });
    expected.add(new Object[] { new TestObject("three") });
    Values result = values_1.intersect(values_2);
    ValuesComparison.compare(result, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Aggregations

TestObject (com.oracle.tck.lib.autd2.unittests.TestObject)61 Test (org.junit.Test)60 AssertionFailedException (com.sun.tck.lib.AssertionFailedException)22 ArrayList (java.util.ArrayList)20 Values (com.sun.tck.lib.tgf.Values)18 BaseTestGroup (com.oracle.tck.lib.autd2.unittests.BaseTestGroup)1 TestCase (com.sun.tck.test.TestCase)1 List (java.util.List)1