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

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

# Line 161 | Line 161 | public class ArrayBlockingQueueTest exte
161      }
162  
163      /**
164 <     *  offer(null) throws NPE
164 >     * offer(null) throws NPE
165       */
166      public void testOfferNull() {
167          try {
# Line 172 | Line 172 | public class ArrayBlockingQueueTest exte
172      }
173  
174      /**
175 <     *  add(null) throws NPE
175 >     * add(null) throws NPE
176       */
177      public void testAddNull() {
178          try {
# Line 207 | Line 207 | public class ArrayBlockingQueueTest exte
207      }
208  
209      /**
210 <     *  addAll(null) throws NPE
210 >     * addAll(null) throws NPE
211       */
212      public void testAddAll1() {
213          try {
# Line 230 | Line 230 | public class ArrayBlockingQueueTest exte
230  
231  
232      /**
233 <     *  addAll of a collection with null elements throws NPE
233 >     * addAll of a collection with null elements throws NPE
234       */
235      public void testAddAll2() {
236          try {
# Line 286 | Line 286 | public class ArrayBlockingQueueTest exte
286      }
287  
288      /**
289 <     *  put(null) throws NPE
289 >     * put(null) throws NPE
290       */
291      public void testPutNull() throws InterruptedException {
292          try {
# Line 623 | Line 623 | public class ArrayBlockingQueueTest exte
623      }
624  
625      /**
626 <     *  toArray contains all elements
626 >     * toArray contains all elements
627       */
628      public void testToArray() throws InterruptedException {
629          ArrayBlockingQueue q = populatedQueue(SIZE);
# Line 896 | Line 896 | public class ArrayBlockingQueueTest exte
896      }
897  
898      /**
899 <     * drainTo(c, n) empties first max {n, size} elements of queue into c
899 >     * drainTo(c, n) empties first min(n, size) elements of queue into c
900       */
901      public void testDrainToN() {
902          ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE*2);
# Line 905 | Line 905 | public class ArrayBlockingQueueTest exte
905                  assertTrue(q.offer(new Integer(j)));
906              ArrayList l = new ArrayList();
907              q.drainTo(l, i);
908 <            int k = (i < SIZE)? i : SIZE;
908 >            int k = (i < SIZE) ? i : SIZE;
909              assertEquals(l.size(), k);
910              assertEquals(q.size(), SIZE-k);
911              for (int j = 0; j < k; ++j)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines