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

Comparing jsr166/src/test/tck/CompletableFutureTest.java (file contents):
Revision 1.26 by dl, Fri Jul 5 15:47:52 2013 UTC vs.
Revision 1.30 by jsr166, Mon Jul 22 18:25:42 2013 UTC

# Line 259 | Line 259 | public class CompletableFutureTest exten
259          assertEquals(g.getNumberOfDependents(), 0);
260      }
261  
262
262      /**
263       * toString indicates current completion state
264       */
# Line 374 | Line 373 | public class CompletableFutureTest exten
373          }
374      }
375  
377
376      /**
377       * exceptionally action completes with function value on source
378 <     * exception;  otherwise with source value
378 >     * exception; otherwise with source value
379       */
380      public void testExceptionally() {
381          CompletableFuture<Integer> f = new CompletableFuture<>();
# Line 663 | Line 661 | public class CompletableFutureTest exten
661          checkCompletedWithWrappedCancellationException(g);
662      }
663  
666
664      /**
665       * thenCombine result completes normally after normal completion
666       * of sources
# Line 1171 | Line 1168 | public class CompletableFutureTest exten
1168          checkCompletedWithWrappedCancellationException(g);
1169      }
1170  
1174
1171      /**
1172       * runAfterEither result completes normally after normal completion
1173       * of either source
# Line 1320 | Line 1316 | public class CompletableFutureTest exten
1316          checkCompletedWithWrappedCancellationException(g);
1317      }
1318  
1323
1319      // asyncs
1320  
1321      /**
# Line 1353 | Line 1348 | public class CompletableFutureTest exten
1348          try {
1349              g.join();
1350              shouldThrow();
1351 <        } catch (Exception ok) {
1357 <        }
1351 >        } catch (CompletionException success) {}
1352          checkCompletedWithWrappedCFException(g);
1353      }
1354  
# Line 2088 | Line 2082 | public class CompletableFutureTest exten
2082          checkCompletedWithWrappedCancellationException(g);
2083      }
2084  
2091
2085      // async with explicit executors
2086  
2087      /**
# Line 2121 | Line 2114 | public class CompletableFutureTest exten
2114          try {
2115              g.join();
2116              shouldThrow();
2117 <        } catch (Exception ok) {
2125 <        }
2117 >        } catch (CompletionException success) {}
2118          checkCompletedWithWrappedCFException(g);
2119      }
2120  
# Line 3181 | Line 3173 | public class CompletableFutureTest exten
3173          checkCompletedWithWrappedCFException(g);
3174      }
3175  
3184
3176      /**
3177 <     * handleAsync action action completes normally with function
3178 <     * value on either normal or exceptional completion of source
3177 >     * handleAsync action completes normally with function value on
3178 >     * either normal or exceptional completion of source
3179       */
3180      public void testHandleAsync() {
3181          CompletableFuture<Integer> f, g;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines