assertIteratorNotModifiable(list.iterator());
assertIteratorNotModifiable(list.subList(0,list.size()-2).iterator());
}
public final void testListIteratorNotModifiable() throws Exception {
CharList list = makeUnmodifiableCharList();
assertListIteratorNotModifiable(list.listIterator());
assertListIteratorNotModifiable(list.subList(0,list.size()-2).listIterator());
assertListIteratorNotModifiable(list.listIterator(1));
assertListIteratorNotModifiable(list.subList(0,list.size()-2).listIterator(1));
}