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

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

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

revision 1.34, Wed Dec 31 20:17:39 2014 UTC revision 1.35, Sat Jan 17 22:55:06 2015 UTC
# Line 379  Line 379 
379       */       */
380      public void testIterator() {      public void testIterator() {
381          LinkedList q = populatedQueue(SIZE);          LinkedList q = populatedQueue(SIZE);
         int i = 0;  
382          Iterator it = q.iterator();          Iterator it = q.iterator();
383          while (it.hasNext()) {          int i;
384            for (i = 0; it.hasNext(); i++)
385              assertTrue(q.contains(it.next()));              assertTrue(q.contains(it.next()));
             ++i;  
         }  
386          assertEquals(i, SIZE);          assertEquals(i, SIZE);
387            assertIteratorExhausted(it);
388        }
389    
390        /**
391         * iterator of empty collection has no elements
392         */
393        public void testEmptyIterator() {
394            assertIteratorExhausted(new LinkedList().iterator());
395      }      }
396    
397      /**      /**

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8