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

Comparing jsr166/src/test/tck/FutureTaskTest.java (file contents):
Revision 1.16 by jsr166, Sat Nov 21 02:07:26 2009 UTC vs.
Revision 1.17 by jsr166, Sat Nov 21 10:25:05 2009 UTC

# Line 36 | Line 36 | public class FutureTaskTest extends JSR1
36      public void testConstructor() {
37          try {
38              FutureTask task = new FutureTask(null);
39 <            shouldThrow("NullPointerException");
39 >            shouldThrow();
40          } catch (NullPointerException success) {}
41      }
42  
# Line 46 | Line 46 | public class FutureTaskTest extends JSR1
46      public void testConstructor2() {
47          try {
48              FutureTask task = new FutureTask(null, Boolean.TRUE);
49 <            shouldThrow("NullPointerException");
49 >            shouldThrow();
50          } catch (NullPointerException success) {}
51      }
52  
# Line 100 | Line 100 | public class FutureTaskTest extends JSR1
100          task.setException(nse);
101          try {
102              Object x = task.get();
103 <            shouldThrow("ExecutionException");
103 >            shouldThrow();
104          } catch (ExecutionException success) {
105              assertSame(success.getCause(), nse);
106          }
# Line 289 | Line 289 | public class FutureTaskTest extends JSR1
289          ft.run();
290          try {
291              ft.get();
292 <            shouldThrow("ExecutionException");
292 >            shouldThrow();
293          } catch (ExecutionException success) {
294              assertTrue(success.getCause() instanceof ArithmeticException);
295          }
# Line 307 | Line 307 | public class FutureTaskTest extends JSR1
307          ft.run();
308          try {
309              ft.get(SHORT_DELAY_MS, MILLISECONDS);
310 <            shouldThrow("ExecutionException");
310 >            shouldThrow();
311          } catch (ExecutionException success) {
312              assertTrue(success.getCause() instanceof ArithmeticException);
313          }
# Line 353 | Line 353 | public class FutureTaskTest extends JSR1
353          try {
354              FutureTask ft = new FutureTask(new NoOpCallable());
355              ft.get(1,MILLISECONDS);
356 <            shouldThrow("TimeoutException");
356 >            shouldThrow();
357          } catch (TimeoutException success) {}
358      }
359  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines