Search in sources :

Example 1 with Values

use of com.sun.tck.lib.tgf.Values in project jtharness by openjdk.

the class ValuesComparison method checkCachedReturnsTheSame.

public static void checkCachedReturnsTheSame(Values values) {
    final Values cache = values.createCache();
    compare(cache, values);
    checkEqualResultsForEveryIteration(cache);
    final Object[][] objects_1 = ValuesComparison.createArray(cache);
    final Object[][] objects_2 = ValuesComparison.createArray(cache);
    org.junit.Assert.assertEquals(objects_1.length, objects_2.length);
    Arrays.deepEquals(objects_1, objects_2);
    for (int i = 0; i < objects_1.length; i++) {
        final Object[] first = objects_1[i];
        final Object[] second = objects_2[i];
        for (int j = 0; j < first.length; j++) {
            org.junit.Assert.assertFalse(first[j] instanceof AbstractValue);
            org.junit.Assert.assertFalse(second[j] instanceof AbstractValue);
            org.junit.Assert.assertSame(first[j], second[j]);
        }
    }
}
Also used : AbstractValue(com.sun.tck.lib.tgf.AbstractValue) Values(com.sun.tck.lib.tgf.Values)

Example 2 with Values

use of com.sun.tck.lib.tgf.Values in project jtharness by openjdk.

the class Mixed method testDiag_pseudoMult_intersect_17.

@Test
public void testDiag_pseudoMult_intersect_17() {
    Values values = createRow(1, 9).unite(createRow(5, 6)).intersect(pseudoMultiply(createColumn(1, 9, 5), createColumn(99, 6, 6, 9, 10, 11, 12)));
    List<Object[]> expected = new ArrayList<Object[]>();
    expected.add(new Object[] { 1, 9 });
    expected.add(new Object[] { 5, 6 });
    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) Test(org.junit.Test)

Example 3 with Values

use of com.sun.tck.lib.tgf.Values in project jtharness by openjdk.

the class Mixed method test_50_4.

@Test
public void test_50_4() {
    Values values = new ValuesImplSlow("a").pseudoMultiply();
    List<Object[]> expected = new ArrayList<Object[]>();
    ValuesComparison.compare(values, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ValuesImplSlow(com.oracle.tck.lib.autd2.unittests.tgfported.ValuesImplSlow) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 4 with Values

use of com.sun.tck.lib.tgf.Values in project jtharness by openjdk.

the class Mixed method test_withEmpty_1_implSlow.

@Test
public void test_withEmpty_1_implSlow() {
    Values values = new ValuesImplSlow("a").intersect().multiply(new ValuesImplSlow("a"));
    List<Object[]> expected = new ArrayList<Object[]>();
    ValuesComparison.compare(values, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ValuesImplSlow(com.oracle.tck.lib.autd2.unittests.tgfported.ValuesImplSlow) ArrayList(java.util.ArrayList) TestObject(com.oracle.tck.lib.autd2.unittests.TestObject) Test(org.junit.Test)

Example 5 with Values

use of com.sun.tck.lib.tgf.Values in project jtharness by openjdk.

the class Mixed method test_00004.

@Test
public void test_00004() {
    Values v_1 = createColumn("a", "b");
    Values v_2 = createColumn();
    Values v_3 = createColumn();
    Values vfinal = v_3.unite(v_1.unite(v_2));
    List<Object[]> expected = new ArrayList<>();
    expected.add(new Object[] { "a" });
    expected.add(new Object[] { "b" });
    ValuesComparison.compare(vfinal, expected);
}
Also used : Values(com.sun.tck.lib.tgf.Values) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

Values (com.sun.tck.lib.tgf.Values)528 Test (org.junit.Test)512 ArrayList (java.util.ArrayList)459 TestObject (com.oracle.tck.lib.autd2.unittests.TestObject)80 DataFactory.createValues (com.sun.tck.lib.tgf.DataFactory.createValues)50 Transform (com.sun.tck.lib.tgf.Transform)32 TestResult (com.oracle.tck.lib.autd2.TestResult)31 TestCase (com.sun.tck.test.TestCase)28 TestGroup (com.sun.tck.test.TestGroup)27 TestData (com.sun.tck.lib.tgf.TestData)22 BaseTestGroup (com.oracle.tck.lib.autd2.unittests.BaseTestGroup)21 ValuesImplSlow (com.oracle.tck.lib.autd2.unittests.tgfported.ValuesImplSlow)12 IntPair (com.oracle.tck.lib.autd2.unittests.IntPair)7 Operation (com.sun.tck.lib.tgf.data.Operation)6 DataFactory (com.sun.tck.lib.tgf.DataFactory)5 Color (java.awt.Color)5 ColorSpace (java.awt.color.ColorSpace)3 RandomAccess (java.util.RandomAccess)3 Assert.assertEquals (com.sun.tck.lib.Assert.assertEquals)2 Assert.assertTrue (com.sun.tck.lib.Assert.assertTrue)2