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

Comparing jsr166/src/test/tck/CopyOnWriteArrayListTest.java (file contents):
Revision 1.31 by jsr166, Wed Dec 31 19:05:42 2014 UTC vs.
Revision 1.32 by jsr166, Sat Jan 17 22:55:06 2015 UTC

# Line 264 | Line 264 | public class CopyOnWriteArrayListTest ex
264              assertTrue(it.hasNext());
265              assertEquals(elements[j], it.next());
266          }
267 <        assertFalse(it.hasNext());
268 <        try {
269 <            it.next();
270 <            shouldThrow();
271 <        } catch (NoSuchElementException success) {}
267 >        assertIteratorExhausted(it);
268 >    }
269 >
270 >    /**
271 >     * iterator of empty collection has no elements
272 >     */
273 >    public void testEmptyIterator() {
274 >        Collection c = new CopyOnWriteArrayList();
275 >        assertIteratorExhausted(c.iterator());
276      }
277  
278      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines