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

Comparing jsr166/src/test/tck/LinkedTransferQueueTest.java (file contents):
Revision 1.48 by jsr166, Tue May 31 16:16:24 2011 UTC vs.
Revision 1.49 by jsr166, Fri Jul 15 18:49:31 2011 UTC

# Line 368 | Line 368 | public class LinkedTransferQueueTest ext
368      }
369  
370      /**
371     * remove(x) removes x and returns true if present
372     */
373    public void testRemoveElement() throws InterruptedException {
374        LinkedTransferQueue q = populatedQueue(SIZE);
375        for (int i = 1; i < SIZE; i+=2) {
376            assertTrue(q.contains(i));
377            assertTrue(q.remove(i));
378            assertFalse(q.contains(i));
379            assertTrue(q.contains(i-1));
380        }
381        for (int i = 0; i < SIZE; i+=2) {
382            assertTrue(q.contains(i));
383            assertTrue(q.remove(i));
384            assertFalse(q.contains(i));
385            assertFalse(q.remove(i+1));
386            assertFalse(q.contains(i+1));
387        }
388        checkEmpty(q);
389    }
390
391    /**
371       * An add following remove(x) succeeds
372       */
373      public void testRemoveElementAndAdd() throws InterruptedException {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines