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.42 by jsr166, Mon Oct 17 00:56:11 2016 UTC vs.
Revision 1.46 by jsr166, Sat Mar 11 18:20:47 2017 UTC

# Line 13 | Line 13 | import java.util.LinkedList;
13   import java.util.NoSuchElementException;
14  
15   import junit.framework.Test;
16 import junit.framework.TestSuite;
16  
17   public class LinkedListTest extends JSR166TestCase {
18      public static void main(String[] args) {
# Line 28 | Line 27 | public class LinkedListTest extends JSR1
27              public boolean isConcurrent() { return false; }
28              public boolean permitsNulls() { return true; }
29          }
30 <        return newTestSuite(LinkedListTest.class,
31 <                            CollectionTest.testSuite(new Implementation()));
30 >        class SubListImplementation extends Implementation {
31 >            public Collection emptyCollection() {
32 >                return new LinkedList().subList(0, 0);
33 >            }
34 >        }
35 >        return newTestSuite(
36 >                LinkedListTest.class,
37 >                CollectionTest.testSuite(new Implementation()),
38 >                CollectionTest.testSuite(new SubListImplementation()));
39      }
40  
41      /**
42       * Returns a new queue of given size containing consecutive
43       * Integers 0 ... n - 1.
44       */
45 <    private LinkedList<Integer> populatedQueue(int n) {
46 <        LinkedList<Integer> q = new LinkedList<Integer>();
45 >    private static LinkedList<Integer> populatedQueue(int n) {
46 >        LinkedList<Integer> q = new LinkedList<>();
47          assertTrue(q.isEmpty());
48          for (int i = 0; i < n; ++i)
49              assertTrue(q.offer(new Integer(i)));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines