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.59 by jsr166, Sat Feb 28 19:59:23 2015 UTC vs.
Revision 1.62 by jsr166, Fri May 15 18:21:19 2015 UTC

# Line 38 | Line 38 | public class PriorityBlockingQueueTest e
38      }
39  
40      public static void main(String[] args) {
41 <        junit.textui.TestRunner.run(suite());
41 >        main(suite(), args);
42      }
43  
44      public static Test suite() {
# Line 197 | Line 197 | public class PriorityBlockingQueueTest e
197       * Offer of non-Comparable throws CCE
198       */
199      public void testOfferNonComparable() {
200 +        PriorityBlockingQueue q = new PriorityBlockingQueue(1);
201          try {
201            PriorityBlockingQueue q = new PriorityBlockingQueue(1);
202            q.offer(new Object());
202              q.offer(new Object());
203              q.offer(new Object());
204              shouldThrow();
# Line 221 | Line 220 | public class PriorityBlockingQueueTest e
220       * addAll(this) throws IAE
221       */
222      public void testAddAllSelf() {
223 +        PriorityBlockingQueue q = populatedQueue(SIZE);
224          try {
225            PriorityBlockingQueue q = populatedQueue(SIZE);
225              q.addAll(q);
226              shouldThrow();
227          } catch (IllegalArgumentException success) {}
# Line 233 | Line 232 | public class PriorityBlockingQueueTest e
232       * possibly adding some elements
233       */
234      public void testAddAll3() {
235 +        PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE);
236 +        Integer[] ints = new Integer[SIZE];
237 +        for (int i = 0; i < SIZE-1; ++i)
238 +            ints[i] = new Integer(i);
239          try {
237            PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE);
238            Integer[] ints = new Integer[SIZE];
239            for (int i = 0; i < SIZE-1; ++i)
240                ints[i] = new Integer(i);
240              q.addAll(Arrays.asList(ints));
241              shouldThrow();
242          } catch (NullPointerException success) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines