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.35 by jsr166, Mon Aug 3 19:07:51 2009 UTC vs.
Revision 1.36 by jsr166, Mon Aug 3 22:08:45 2009 UTC

# Line 9 | Line 9
9   import junit.framework.*;
10   import java.util.*;
11   import java.util.concurrent.*;
12 + import static java.util.concurrent.TimeUnit.MILLISECONDS;
13   import java.io.*;
14   import java.security.*;
15  
# Line 320 | Line 321 | public class JSR166TestCase extends Test
321      public void joinPool(ExecutorService exec) {
322          try {
323              exec.shutdown();
324 <            assertTrue(exec.awaitTermination(LONG_DELAY_MS, TimeUnit.MILLISECONDS));
324 >            assertTrue(exec.awaitTermination(LONG_DELAY_MS, MILLISECONDS));
325          } catch (SecurityException ok) {
326              // Allowed in case test doesn't have privs
327          } catch (InterruptedException ie) {
# Line 343 | Line 344 | public class JSR166TestCase extends Test
344          fail("Unexpected exception");
345      }
346  
347 +    /**
348 +     * fail with message "Unexpected exception", with argument
349 +     */
350 +    public void unexpectedException(Throwable ex) {
351 +        ex.printStackTrace();
352 +        fail("Unexpected exception: " + ex);
353 +    }
354 +
355  
356      /**
357       * The number of elements to place in collections, arrays, etc.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines