assertEquals(0, iter.previousInt());
}
@Test
public void testSimpleIntervalAccess() {
IntList list = new IntIntervalList(42, 43);
assertFalse(list.isEmpty());
assertEquals(1, list.size());
assertEquals(42, list.getInt(0));
try {
list.getInt(1);
fail("getInt(1) should throw");
} catch (IndexOutOfBoundsException e) {
/* no-op */
}
IntListIterator iter = list.iterator();
assertTrue(iter.hasNext());
assertFalse(iter.hasPrevious());
assertEquals(42, iter.nextInt());
assertFalse(iter.hasNext());
assertTrue(iter.hasPrevious());