# | Line 434 | Line 434 | public class SynchronousQueueTest extend | |
---|---|---|
434 | public void testIterator() { testIterator(false); } | |
435 | public void testIterator_fair() { testIterator(true); } | |
436 | public void testIterator(boolean fair) { | |
437 | < | final SynchronousQueue q = new SynchronousQueue(fair); |
438 | < | Iterator it = q.iterator(); |
439 | < | assertFalse(it.hasNext()); |
440 | < | try { |
441 | < | Object x = it.next(); |
442 | < | shouldThrow(); |
443 | < | } catch (NoSuchElementException success) {} |
437 | > | assertIteratorExhausted(new SynchronousQueue(fair).iterator()); |
438 | } | |
439 | ||
440 | /** |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |