[cvs] / jsr166 / src / test / tck / FutureTaskTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/FutureTaskTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16, Sat Nov 21 02:07:26 2009 UTC revision 1.17, Sat Nov 21 10:25:05 2009 UTC
# Line 36  Line 36 
36      public void testConstructor() {      public void testConstructor() {
37          try {          try {
38              FutureTask task = new FutureTask(null);              FutureTask task = new FutureTask(null);
39              shouldThrow("NullPointerException");              shouldThrow();
40          } catch (NullPointerException success) {}          } catch (NullPointerException success) {}
41      }      }
42    
# Line 46  Line 46 
46      public void testConstructor2() {      public void testConstructor2() {
47          try {          try {
48              FutureTask task = new FutureTask(null, Boolean.TRUE);              FutureTask task = new FutureTask(null, Boolean.TRUE);
49              shouldThrow("NullPointerException");              shouldThrow();
50          } catch (NullPointerException success) {}          } catch (NullPointerException success) {}
51      }      }
52    
# Line 100  Line 100 
100          task.setException(nse);          task.setException(nse);
101          try {          try {
102              Object x = task.get();              Object x = task.get();
103              shouldThrow("ExecutionException");              shouldThrow();
104          } catch (ExecutionException success) {          } catch (ExecutionException success) {
105              assertSame(success.getCause(), nse);              assertSame(success.getCause(), nse);
106          }          }
# Line 289  Line 289 
289          ft.run();          ft.run();
290          try {          try {
291              ft.get();              ft.get();
292              shouldThrow("ExecutionException");              shouldThrow();
293          } catch (ExecutionException success) {          } catch (ExecutionException success) {
294              assertTrue(success.getCause() instanceof ArithmeticException);              assertTrue(success.getCause() instanceof ArithmeticException);
295          }          }
# Line 307  Line 307 
307          ft.run();          ft.run();
308          try {          try {
309              ft.get(SHORT_DELAY_MS, MILLISECONDS);              ft.get(SHORT_DELAY_MS, MILLISECONDS);
310              shouldThrow("ExecutionException");              shouldThrow();
311          } catch (ExecutionException success) {          } catch (ExecutionException success) {
312              assertTrue(success.getCause() instanceof ArithmeticException);              assertTrue(success.getCause() instanceof ArithmeticException);
313          }          }
# Line 353  Line 353 
353          try {          try {
354              FutureTask ft = new FutureTask(new NoOpCallable());              FutureTask ft = new FutureTask(new NoOpCallable());
355              ft.get(1,MILLISECONDS);              ft.get(1,MILLISECONDS);
356              shouldThrow("TimeoutException");              shouldThrow();
357          } catch (TimeoutException success) {}          } catch (TimeoutException success) {}
358      }      }
359    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8