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

Comparing jsr166/src/test/tck/SynchronousQueueTest.java (file contents):
Revision 1.44 by jsr166, Wed Dec 31 19:05:43 2014 UTC vs.
Revision 1.46 by jsr166, Sat Jan 17 22:55:06 2015 UTC

# Line 423 | Line 423 | public class SynchronousQueueTest extend
423      public void testToArray_null(boolean fair) {
424          final SynchronousQueue q = new SynchronousQueue(fair);
425          try {
426 <            Object o[] = q.toArray(null);
426 >            Object[] o = q.toArray(null);
427              shouldThrow();
428          } catch (NullPointerException success) {}
429      }
# Line 434 | Line 434 | public class SynchronousQueueTest extend
434      public void testIterator()      { testIterator(false); }
435      public void testIterator_fair() { testIterator(true); }
436      public void testIterator(boolean fair) {
437 <        final SynchronousQueue q = new SynchronousQueue(fair);
438 <        Iterator it = q.iterator();
439 <        assertFalse(it.hasNext());
440 <        try {
441 <            Object x = it.next();
442 <            shouldThrow();
443 <        } catch (NoSuchElementException success) {}
437 >        assertIteratorExhausted(new SynchronousQueue(fair).iterator());
438      }
439  
440      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines