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

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

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

revision 1.31, Wed Dec 31 20:09:08 2014 UTC revision 1.32, Sat Jan 17 22:55:06 2015 UTC
# Line 742  Line 742 
742       */       */
743      public void testIterator() {      public void testIterator() {
744          ArrayDeque q = populatedDeque(SIZE);          ArrayDeque q = populatedDeque(SIZE);
         int i = 0;  
745          Iterator it = q.iterator();          Iterator it = q.iterator();
746          while (it.hasNext()) {          int i;
747            for (i = 0; it.hasNext(); i++)
748              assertTrue(q.contains(it.next()));              assertTrue(q.contains(it.next()));
             ++i;  
         }  
749          assertEquals(i, SIZE);          assertEquals(i, SIZE);
750            assertIteratorExhausted(it);
751        }
752    
753        /**
754         * iterator of empty collection has no elements
755         */
756        public void testEmptyIterator() {
757            Deque c = new ArrayDeque();
758            assertIteratorExhausted(c.iterator());
759            assertIteratorExhausted(c.descendingIterator());
760      }      }
761    
762      /**      /**

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8