ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/LinkedListTest.java
(Generate patch)

Comparing jsr166/src/test/tck/LinkedListTest.java (file contents):
Revision 1.41 by jsr166, Sun Oct 16 20:44:18 2016 UTC vs.
Revision 1.44 by jsr166, Wed Jan 4 06:09:58 2017 UTC

# Line 21 | Line 21 | public class LinkedListTest extends JSR1
21      }
22  
23      public static Test suite() {
24 <        return new TestSuite(LinkedListTest.class);
24 >        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 >        class SubListImplementation extends Implementation {
32 >            public Collection emptyCollection() {
33 >                return new LinkedList().subList(0, 0);
34 >            }
35 >        }
36 >        return newTestSuite(
37 >                LinkedListTest.class,
38 >                CollectionTest.testSuite(new Implementation()),
39 >                CollectionTest.testSuite(new SubListImplementation()));
40      }
41  
42      /**
# Line 29 | Line 44 | public class LinkedListTest extends JSR1
44       * Integers 0 ... n - 1.
45       */
46      private LinkedList<Integer> populatedQueue(int n) {
47 <        LinkedList<Integer> q = new LinkedList<Integer>();
47 >        LinkedList<Integer> q = new LinkedList<>();
48          assertTrue(q.isEmpty());
49          for (int i = 0; i < n; ++i)
50              assertTrue(q.offer(new Integer(i)));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines