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.25 by jsr166, Tue Dec 1 06:03:49 2009 UTC vs.
Revision 1.28 by dl, Wed Sep 29 12:33:48 2010 UTC

# Line 14 | Line 14 | import java.io.*;
14  
15   public class PriorityBlockingQueueTest extends JSR166TestCase {
16      public static void main(String[] args) {
17 <        junit.textui.TestRunner.run (suite());
17 >        junit.textui.TestRunner.run(suite());
18      }
19      public static Test suite() {
20          return new TestSuite(PriorityBlockingQueueTest.class);
# Line 245 | Line 245 | public class PriorityBlockingQueueTest e
245              shouldThrow();
246          } catch (NullPointerException success) {}
247      }
248 +
249      /**
250       * addAll of a collection with any null elements throws NPE after
251       * possibly adding some elements
# Line 451 | Line 452 | public class PriorityBlockingQueueTest e
452          final PriorityBlockingQueue q = new PriorityBlockingQueue(2);
453          Thread t = new Thread(new CheckedRunnable() {
454              public void realRun() throws InterruptedException {
454                assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
455                assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
455                  try {
456 +                    assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
457 +                    assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
458                      q.poll(LONG_DELAY_MS, MILLISECONDS);
459                      shouldThrow();
460                  } catch (InterruptedException success) {}
# Line 663 | Line 664 | public class PriorityBlockingQueueTest e
664      /**
665       * iterator.remove removes current element
666       */
667 <    public void testIteratorRemove () {
667 >    public void testIteratorRemove() {
668          final PriorityBlockingQueue q = new PriorityBlockingQueue(3);
669          q.add(new Integer(2));
670          q.add(new Integer(1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines