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

Comparing jsr166/src/test/tck/PriorityBlockingQueueTest.java (file contents):
Revision 1.29 by jsr166, Wed Oct 6 07:49:23 2010 UTC vs.
Revision 1.32 by jsr166, Tue Oct 19 00:43:49 2010 UTC

# Line 595 | Line 595 | public class PriorityBlockingQueueTest e
595      }
596  
597      /**
598 <     *  toArray contains all elements
598 >     * toArray contains all elements
599       */
600      public void testToArray() throws InterruptedException {
601          PriorityBlockingQueue q = populatedQueue(SIZE);
# Line 813 | Line 813 | public class PriorityBlockingQueueTest e
813      }
814  
815      /**
816 <     * drainTo(c, n) empties first max {n, size} elements of queue into c
816 >     * drainTo(c, n) empties first min(n, size) elements of queue into c
817       */
818      public void testDrainToN() {
819          PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE*2);
# Line 822 | Line 822 | public class PriorityBlockingQueueTest e
822                  assertTrue(q.offer(new Integer(j)));
823              ArrayList l = new ArrayList();
824              q.drainTo(l, i);
825 <            int k = (i < SIZE)? i : SIZE;
825 >            int k = (i < SIZE) ? i : SIZE;
826              assertEquals(l.size(), k);
827              assertEquals(q.size(), SIZE-k);
828              for (int j = 0; j < k; ++j)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines