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

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

# Line 30 | Line 30 | public class LinkedBlockingQueueTest ext
30  
31      public static class Bounded extends BlockingQueueTest {
32          protected BlockingQueue emptyCollection() {
33 <            return new LinkedBlockingQueue(20);
33 >            return new LinkedBlockingQueue(SIZE);
34          }
35      }
36  
# Line 504 | Line 504 | public class LinkedBlockingQueueTest ext
504      }
505  
506      /**
507     * remove(x) removes x and returns true if present
508     */
509    public void testRemoveElement() {
510        LinkedBlockingQueue q = populatedQueue(SIZE);
511        for (int i = 1; i < SIZE; i+=2) {
512            assertTrue(q.contains(i));
513            assertTrue(q.remove(i));
514            assertFalse(q.contains(i));
515            assertTrue(q.contains(i-1));
516        }
517        for (int i = 0; i < SIZE; i+=2) {
518            assertTrue(q.contains(i));
519            assertTrue(q.remove(i));
520            assertFalse(q.contains(i));
521            assertFalse(q.remove(i+1));
522            assertFalse(q.contains(i+1));
523        }
524        assertTrue(q.isEmpty());
525    }
526
527    /**
507       * An add following remove(x) succeeds
508       */
509      public void testRemoveElementAndAdd() throws InterruptedException {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines