use of com.sun.tck.lib.Assert.assertTrue in project jtharness by openjdk.
the class Examples method test_03.
@Test
public void test_03() {
@TestGroup
class Test {
Values colors = createColumn(BLUE, BLACK, WHITE).<Color>filter(c -> createRow(c.darker(), c.brighter()));
@TestCase
@TestData("colors")
public void test(Color darker, Color brighter) {
assertTrue(darker.getRed() <= brighter.getRed());
assertTrue(darker.getGreen() <= brighter.getGreen());
assertTrue(darker.getBlue() <= brighter.getBlue());
}
}
com.oracle.tck.lib.autd2.TestResult s = TU.runTestGroup(new Test());
Assert.assertTrue(s.isOK());
Assert.assertEquals("test cases: 1; all passed", s.getMessage());
}
use of com.sun.tck.lib.Assert.assertTrue in project jtharness by openjdk.
the class Examples method test_03_array.
@Test
public void test_03_array() {
@TestGroup
class Test {
Values quantities = createColumn(new Color[] { BLUE, BLACK, WHITE }, new Color[] { BLACK, WHITE, BLUE, GREEN }, new Color[] { BLUE, BLACK }, new Color[] { RED }).<Color[]>filter(colors -> createRow(colors.length));
@TestCase
@TestData("quantities")
public void test(int quantity) {
assertTrue(quantity > 0);
}
}
com.oracle.tck.lib.autd2.TestResult s = TU.runTestGroup(new Test());
Assert.assertTrue(s.isOK());
Assert.assertEquals("test cases: 1; all passed", s.getMessage());
}
Aggregations