MCPcopy Create free account
hub / github.com/ReadyTalk/avian / iteratorNoElementFail

Method iteratorNoElementFail

test/ArrayDequeTest.java:144–160  ·  view source on GitHub ↗
(boolean desc)

Source from the content-addressed store, hash-verified

142 }
143
144 private static void iteratorNoElementFail(boolean desc) {
145 ArrayDeque<Object> ad = new ArrayDeque<Object>();
146
147 Iterator<Object> testIt;
148 if (desc) {
149 testIt = ad.descendingIterator();
150 } else {
151 testIt = ad.iterator();
152 }
153
154 try {
155 testIt.next();
156 throw new RuntimeException("Exception should have thrown");
157 } catch (NoSuchElementException e) {
158 // expected
159 }
160 }
161}

Callers 1

mainMethod · 0.95

Calls 3

descendingIteratorMethod · 0.95
iteratorMethod · 0.95
nextMethod · 0.65

Tested by

no test coverage detected