use of com.sun.tck.lib.tgf.LeafIterator in project jtharness by openjdk.
the class TestLeafIterator method zeroTwoDimArray.
@Test
public void zeroTwoDimArray() {
LeafIterator iterator = new LeafIterator(new Object[][] {});
Assert.assertFalse(iterator.hasNext());
}
use of com.sun.tck.lib.tgf.LeafIterator in project jtharness by openjdk.
the class TestLeafIterator method emptyIterator.
@Test
public void emptyIterator() {
LeafIterator iterator = new LeafIterator();
Assert.assertFalse(iterator.hasNext());
try {
iterator.next();
Assert.fail("ArrayIndexOutOfBoundsException expected");
} catch (ArrayIndexOutOfBoundsException e) {
// OK, lets freeze this behavior for now
}
}
use of com.sun.tck.lib.tgf.LeafIterator in project jtharness by openjdk.
the class TestLeafIterator method zeroDimArray.
@Test
public void zeroDimArray() {
LeafIterator iterator = new LeafIterator(new Object[] {});
Assert.assertFalse(iterator.hasNext());
try {
iterator.next();
Assert.fail("ArrayIndexOutOfBoundsException expected");
} catch (ArrayIndexOutOfBoundsException e) {
// OK, lets freeze this behavior for now
}
}
use of com.sun.tck.lib.tgf.LeafIterator in project jtharness by openjdk.
the class TestTransformingIterator method testToString.
@Test
public void testToString() {
TransformingIterator iterator = new TransformingIterator(new LeafIterator(1, 2, 3), new Object() {
@Transform
int transform(int i) {
return i;
}
});
Assert.assertEquals("0", iterator.toString());
}
Aggregations