[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.27, Fri May 27 19:14:39 2011 UTC revision 1.30, Tue Feb 21 01:54:04 2012 UTC
# Line 7  Line 7 
7   */   */
8    
9  import junit.framework.*;  import junit.framework.*;
10  import java.util.*;  import java.util.Arrays;
11  import java.util.concurrent.*;  import java.util.Collection;
12    import java.util.Iterator;
13    import java.util.LinkedList;
14    import java.util.NoSuchElementException;
15    
16  public class LinkedListTest extends JSR166TestCase {  public class LinkedListTest extends JSR166TestCase {
17      public static void main(String[] args) {      public static void main(String[] args) {
# Line 20  Line 23 
23      }      }
24    
25      /**      /**
26       * Create a queue of given size containing consecutive       * Creates a queue of given size containing consecutive
27       * Integers 0 ... n.       * Integers 0 ... n.
28       */       */
29      private LinkedList<Integer> populatedQueue(int n) {      private LinkedList<Integer> populatedQueue(int n) {
# Line 408  Line 411 
411          q.add(new Integer(2));          q.add(new Integer(2));
412          q.add(new Integer(3));          q.add(new Integer(3));
413          Iterator it = q.iterator();          Iterator it = q.iterator();
414          assertEquals(it.next(), 1);          assertEquals(1, it.next());
415          it.remove();          it.remove();
416          it = q.iterator();          it = q.iterator();
417          assertEquals(it.next(), 2);          assertEquals(2, it.next());
418          assertEquals(it.next(), 3);          assertEquals(3, it.next());
419          assertFalse(it.hasNext());          assertFalse(it.hasNext());
420      }      }
421    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.30

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8