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.199 by dl, Thu Sep 20 00:01:22 2018 UTC vs.
Revision 1.204 by jsr166, Sun Sep 23 00:52:18 2018 UTC

# Line 551 | Line 551 | public class CompletableFutureTest exten
551          public CompletableFuture<Integer> apply(Integer x) {
552              invoked();
553              value = x;
554 <            CompletableFuture<Integer> f = new CompletableFuture<>();
555 <            assertTrue(f.complete(inc(x)));
556 <            return f;
554 >            return CompletableFuture.completedFuture(inc(x));
555          }
556      }
557  
# Line 574 | Line 572 | public class CompletableFutureTest exten
572          ExceptionalCompletableFutureFunction(ExecutionMode m) { super(m); }
573          public CompletionStage<Integer> apply(Throwable x) {
574              invoked();
575 <            CompletableFuture<Integer> d = new CompletableFuture<Integer>();
578 <            d.complete(value);
579 <            return d;
575 >            return CompletableFuture.completedFuture(value);
576          }
577      }
578  
# Line 4787 | Line 4783 | public class CompletableFutureTest exten
4783       * default-implemented exceptionallyAsync action completes with
4784       * function value on source exception
4785       */
4786 <    public void testDefaulExceptionallyAsync_exceptionalCompletion() {
4786 >    public void testDefaultExceptionallyAsync_exceptionalCompletion() {
4787          for (boolean createIncomplete : new boolean[] { true, false })
4788          for (Integer v1 : new Integer[] { 1, null })
4789      {
# Line 4814 | Line 4810 | public class CompletableFutureTest exten
4810       * throws an exception, it completes exceptionally with that
4811       * exception
4812       */
4813 <    public void testDefaulExceptionallyAsync_exceptionalCompletionActionFailed() {
4813 >    public void testDefaultExceptionallyAsync_exceptionalCompletionActionFailed() {
4814          for (boolean createIncomplete : new boolean[] { true, false })
4815      {
4816          final AtomicInteger a = new AtomicInteger(0);
# Line 4839 | Line 4835 | public class CompletableFutureTest exten
4835      }}
4836  
4837      /**
4838 <     * defult exceptionallyCompose result completes normally after normal
4838 >     * default exceptionallyCompose result completes normally after normal
4839       * completion of source
4840       */
4841      public void testDefaultExceptionallyCompose_normalCompletion() {
# Line 4906 | Line 4902 | public class CompletableFutureTest exten
4902      }}
4903  
4904      /**
4905 <     * defult exceptionallyComposeAsync result completes normally after normal
4905 >     * default exceptionallyComposeAsync result completes normally after normal
4906       * completion of source
4907       */
4908      public void testDefaultExceptionallyComposeAsync_normalCompletion() {
# Line 4974 | Line 4970 | public class CompletableFutureTest exten
4970  
4971  
4972      /**
4973 <     * defult exceptionallyComposeAsync result completes normally after normal
4973 >     * default exceptionallyComposeAsync result completes normally after normal
4974       * completion of source
4975       */
4976      public void testDefaultExceptionallyComposeAsyncExecutor_normalCompletion() {
# Line 5041 | Line 5037 | public class CompletableFutureTest exten
5037      }}
5038  
5039   }
5044

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines