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.123 by jsr166, Wed Dec 31 19:05:42 2014 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 465 | Line 466 | public class JSR166TestCase extends Test
466      }
467  
468      /**
469 <     * Find missing try { ... } finally { joinPool(e); }
469 >     * Finds missing try { ... } finally { joinPool(e); }
470       */
471      void checkForkJoinPoolThreadLeaks() throws InterruptedException {
472          Thread[] survivors = new Thread[5];
# Line 924 | Line 925 | public class JSR166TestCase extends Test
925      /**
926       * Returns the number of milliseconds since time given by
927       * startNanoTime, which must have been previously returned from a
928 <     * call to {@link System.nanoTime()}.
928 >     * call to {@link System#nanoTime()}.
929       */
930      static long millisElapsedSince(long startNanoTime) {
931          return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime);
# 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