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

Comparing jsr166/src/test/tck/ConcurrentLinkedDequeTest.java (file contents):
Revision 1.22 by jsr166, Sun May 24 01:42:14 2015 UTC vs.
Revision 1.24 by jsr166, Sun Oct 16 20:44:18 2016 UTC

# Line 25 | Line 25 | public class ConcurrentLinkedDequeTest e
25      }
26  
27      public static Test suite() {
28 <        return new TestSuite(ConcurrentLinkedDequeTest.class);
28 >        class Implementation implements CollectionImplementation {
29 >            public Class<?> klazz() { return ConcurrentLinkedDeque.class; }
30 >            public Collection emptyCollection() { return new ConcurrentLinkedDeque(); }
31 >            public Object makeElement(int i) { return i; }
32 >            public boolean isConcurrent() { return true; }
33 >            public boolean permitsNulls() { return false; }
34 >        }
35 >        return newTestSuite(ConcurrentLinkedDequeTest.class,
36 >                            CollectionTest.testSuite(new Implementation()));
37      }
38  
39      /**
40       * Returns a new deque of given size containing consecutive
41 <     * Integers 0 ... n.
41 >     * Integers 0 ... n - 1.
42       */
43      private ConcurrentLinkedDeque<Integer> populatedDeque(int n) {
44          ConcurrentLinkedDeque<Integer> q = new ConcurrentLinkedDeque<Integer>();
# Line 39 | Line 47 | public class ConcurrentLinkedDequeTest e
47              assertTrue(q.offer(new Integer(i)));
48          assertFalse(q.isEmpty());
49          assertEquals(n, q.size());
50 +        assertEquals((Integer) 0, q.peekFirst());
51 +        assertEquals((Integer) (n - 1), q.peekLast());
52          return q;
53      }
54  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines