[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.38, Fri May 15 18:21:19 2015 UTC revision 1.42, Mon Oct 17 00:56:11 2016 UTC
# Line 21  Line 21 
21      }      }
22    
23      public static Test suite() {      public static Test suite() {
24          return new TestSuite(LinkedListTest.class);          class Implementation implements CollectionImplementation {
25                public Class<?> klazz() { return LinkedList.class; }
26                public Collection emptyCollection() { return new LinkedList(); }
27                public Object makeElement(int i) { return i; }
28                public boolean isConcurrent() { return false; }
29                public boolean permitsNulls() { return true; }
30            }
31            return newTestSuite(LinkedListTest.class,
32                                CollectionTest.testSuite(new Implementation()));
33      }      }
34    
35      /**      /**
36       * Returns a new queue of given size containing consecutive       * Returns a new queue of given size containing consecutive
37       * Integers 0 ... n.       * Integers 0 ... n - 1.
38       */       */
39      private LinkedList<Integer> populatedQueue(int n) {      private LinkedList<Integer> populatedQueue(int n) {
40          LinkedList<Integer> q = new LinkedList<Integer>();          LinkedList<Integer> q = new LinkedList<Integer>();
# Line 35  Line 43 
43              assertTrue(q.offer(new Integer(i)));              assertTrue(q.offer(new Integer(i)));
44          assertFalse(q.isEmpty());          assertFalse(q.isEmpty());
45          assertEquals(n, q.size());          assertEquals(n, q.size());
46            assertEquals((Integer) 0, q.peekFirst());
47            assertEquals((Integer) (n - 1), q.peekLast());
48          return q;          return q;
49      }      }
50    

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.42

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8