(boolean desc)
| 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 | } |
no test coverage detected