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

Comparing jsr166/src/test/tck/ForkJoinTaskTest.java (file contents):
Revision 1.48 by dl, Sun Oct 11 19:53:59 2015 UTC vs.
Revision 1.49 by jsr166, Sun Oct 18 16:40:57 2015 UTC

# Line 776 | Line 776 | public class ForkJoinTaskTest extends JS
776      }
777  
778      /**
779 +     * completeExceptionally(null) surprisingly has the same effect as
780 +     * completeExceptionally(new RuntimeException())
781 +     */
782 +    public void testCompleteExceptionally_null() {
783 +        RecursiveAction a = new CheckedRecursiveAction() {
784 +            protected void realCompute() {
785 +                AsyncFib f = new AsyncFib(8);
786 +                f.completeExceptionally(null);
787 +                try {
788 +                    f.invoke();
789 +                    shouldThrow();
790 +                } catch (RuntimeException success) {
791 +                    assertSame(success.getClass(), RuntimeException.class);
792 +                    assertNull(success.getCause());
793 +                    checkCompletedAbnormally(f, success);
794 +                }
795 +            }};
796 +        testInvokeOnPool(mainPool(), a);
797 +    }
798 +
799 +    /**
800       * invokeAll(t1, t2) invokes all task arguments
801       */
802      public void testInvokeAll2() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines