Removing unit test where avian implementation is more readily willing to throw a ConcurrentModificationException.

This commit is contained in:
Mike Jensen 2014-03-19 09:05:06 -06:00
parent b5d388a718
commit 54a1fbac4c

View File

@ -1,5 +1,4 @@
import java.util.ArrayDeque;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.NoSuchElementException;
@ -36,8 +35,6 @@ public class ArrayDequeTest {
iterateTest(true);
iteratorRemoveTest(false);
iteratorRemoveTest(true);
iteratorConcurrentModificationFail(false);
iteratorConcurrentModificationFail(true);
iteratorNoElementFail(false);
iteratorNoElementFail(true);
}
@ -144,30 +141,6 @@ public class ArrayDequeTest {
}
}
private static void iteratorConcurrentModificationFail(boolean desc) {
ArrayDeque<Object> ad = new ArrayDeque<Object>();
ad.add(new Object());
ad.add(new Object());
Iterator<Object> testIt;
if (desc) {
testIt = ad.descendingIterator();
} else {
testIt = ad.iterator();
}
testIt.next();
try {
// modify structure
ad.add(new Object());
testIt.next();
throw new RuntimeException("Exception should have thrown");
} catch (ConcurrentModificationException e) {
// expected
}
}
private static void iteratorNoElementFail(boolean desc) {
ArrayDeque<Object> ad = new ArrayDeque<Object>();