[cvs] / jsr166 / src / test / tck / ArrayBlockingQueueTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ArrayBlockingQueueTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.60, Wed Dec 31 20:17:39 2014 UTC revision 1.61, Sat Jan 17 22:55:06 2015 UTC
# Line 698  Line 698 
698      public void testIterator() throws InterruptedException {      public void testIterator() throws InterruptedException {
699          ArrayBlockingQueue q = populatedQueue(SIZE);          ArrayBlockingQueue q = populatedQueue(SIZE);
700          Iterator it = q.iterator();          Iterator it = q.iterator();
701          while (it.hasNext()) {          int i;
702            for (i = 0; it.hasNext(); i++)
703                assertTrue(q.contains(it.next()));
704            assertEquals(i, SIZE);
705            assertIteratorExhausted(it);
706    
707            it = q.iterator();
708            for (i = 0; it.hasNext(); i++)
709              assertEquals(it.next(), q.take());              assertEquals(it.next(), q.take());
710            assertEquals(i, SIZE);
711            assertIteratorExhausted(it);
712          }          }
713    
714        /**
715         * iterator of empty collection has no elements
716         */
717        public void testEmptyIterator() {
718            assertIteratorExhausted(new ArrayBlockingQueue(SIZE).iterator());
719      }      }
720    
721      /**      /**

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8