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

Comparing jsr166/src/test/tck/PriorityQueueTest.java (file contents):
Revision 1.30 by jsr166, Sat Jan 17 22:55:06 2015 UTC vs.
Revision 1.33 by jsr166, Sat Apr 25 04:55:31 2015 UTC

# Line 19 | Line 19 | import junit.framework.TestSuite;
19  
20   public class PriorityQueueTest extends JSR166TestCase {
21      public static void main(String[] args) {
22 <        junit.textui.TestRunner.run(suite());
22 >        main(suite(), args);
23      }
24      public static Test suite() {
25          return new TestSuite(PriorityQueueTest.class);
# Line 59 | Line 59 | public class PriorityQueueTest extends J
59       */
60      public void testConstructor2() {
61          try {
62 <            PriorityQueue q = new PriorityQueue(0);
62 >            new PriorityQueue(0);
63              shouldThrow();
64          } catch (IllegalArgumentException success) {}
65      }
# Line 69 | Line 69 | public class PriorityQueueTest extends J
69       */
70      public void testConstructor3() {
71          try {
72 <            PriorityQueue q = new PriorityQueue((Collection)null);
72 >            new PriorityQueue((Collection)null);
73              shouldThrow();
74          } catch (NullPointerException success) {}
75      }
# Line 80 | Line 80 | public class PriorityQueueTest extends J
80      public void testConstructor4() {
81          try {
82              Integer[] ints = new Integer[SIZE];
83 <            PriorityQueue q = new PriorityQueue(Arrays.asList(ints));
83 >            new PriorityQueue(Arrays.asList(ints));
84              shouldThrow();
85          } catch (NullPointerException success) {}
86      }
# Line 93 | Line 93 | public class PriorityQueueTest extends J
93              Integer[] ints = new Integer[SIZE];
94              for (int i = 0; i < SIZE-1; ++i)
95                  ints[i] = new Integer(i);
96 <            PriorityQueue q = new PriorityQueue(Arrays.asList(ints));
96 >            new PriorityQueue(Arrays.asList(ints));
97              shouldThrow();
98          } catch (NullPointerException success) {}
99      }
# Line 189 | Line 189 | public class PriorityQueueTest extends J
189       * Offer of non-Comparable throws CCE
190       */
191      public void testOfferNonComparable() {
192 +        PriorityQueue q = new PriorityQueue(1);
193          try {
193            PriorityQueue q = new PriorityQueue(1);
194            q.offer(new Object());
194              q.offer(new Object());
195              q.offer(new Object());
196              shouldThrow();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines