[cvs] / jsr166 / src / test / tck / ArrayBlockingQueueTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ArrayBlockingQueueTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49, Tue May 31 16:16:23 2011 UTC revision 1.50, Fri Jul 15 18:49:31 2011 UTC
# Line 24  Line 24 
24    
25      public static class Fair extends BlockingQueueTest {      public static class Fair extends BlockingQueueTest {
26          protected BlockingQueue emptyCollection() {          protected BlockingQueue emptyCollection() {
27              return new ArrayBlockingQueue(20, true);              return new ArrayBlockingQueue(SIZE, true);
28          }          }
29      }      }
30    
31      public static class NonFair extends BlockingQueueTest {      public static class NonFair extends BlockingQueueTest {
32          protected BlockingQueue emptyCollection() {          protected BlockingQueue emptyCollection() {
33              return new ArrayBlockingQueue(20, false);              return new ArrayBlockingQueue(SIZE, false);
34          }          }
35      }      }
36    
# Line 515  Line 515 
515      }      }
516    
517      /**      /**
      * remove(x) removes x and returns true if present  
      */  
     public void testRemoveElement() {  
         ArrayBlockingQueue q = populatedQueue(SIZE);  
         for (int i = 1; i < SIZE; i+=2) {  
             assertTrue(q.remove(new Integer(i)));  
         }  
         for (int i = 0; i < SIZE; i+=2) {  
             assertTrue(q.remove(new Integer(i)));  
             assertFalse(q.remove(new Integer(i+1)));  
         }  
         assertTrue(q.isEmpty());  
     }  
   
     /**  
518       * contains(x) reports true when elements added but not yet removed       * contains(x) reports true when elements added but not yet removed
519       */       */
520      public void testContains() {      public void testContains() {

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8