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

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.125 by jsr166, Thu Jan 15 18:58:07 2015 UTC vs.
Revision 1.126 by jsr166, Sat Jan 17 22:55:06 2015 UTC

# Line 27 | Line 27 | import java.util.ArrayList;
27   import java.util.Arrays;
28   import java.util.Date;
29   import java.util.Enumeration;
30 + import java.util.Iterator;
31   import java.util.List;
32   import java.util.NoSuchElementException;
33   import java.util.PropertyPermission;
# Line 1468 | Line 1469 | public class JSR166TestCase extends Test
1469                  shouldThrow(expectedExceptionClass.getName());
1470          }
1471      }
1472 +
1473 +    public void assertIteratorExhausted(Iterator<?> it) {
1474 +        try {
1475 +            it.next();
1476 +            shouldThrow();
1477 +        } catch (NoSuchElementException success) {}
1478 +        assertFalse(it.hasNext());
1479 +    }        
1480   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines