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

Comparing jsr166/src/test/tck/RecursiveActionTest.java (file contents):
Revision 1.32 by dl, Tue May 31 10:28:06 2011 UTC vs.
Revision 1.33 by jsr166, Fri Jun 24 18:49:56 2011 UTC

# Line 789 | Line 789 | public class RecursiveActionTest extends
789      }
790  
791      /**
792 <     * A reinitialized task may be re-invoked
792 >     * A reinitialized normally completed task may be re-invoked
793       */
794      public void testReinitialize() {
795          RecursiveAction a = new CheckedRecursiveAction() {
# Line 804 | Line 804 | public class RecursiveActionTest extends
804                      f.reinitialize();
805                      checkNotDone(f);
806                  }
807 +            }};
808 +        testInvokeOnPool(mainPool(), a);
809 +    }
810 +
811 +    /**
812 +     * A reinitialized abnormally completed task may be re-invoked
813 +     */
814 +    public void testReinitializeAbnormal() {
815 +        RecursiveAction a = new CheckedRecursiveAction() {
816 +            public void realCompute() {
817 +                FailingFibAction f = new FailingFibAction(8);
818 +                checkNotDone(f);
819 +
820 +                for (int i = 0; i < 3; i++) {
821 +                    try {
822 +                        f.invoke();
823 +                        shouldThrow();
824 +                    } catch (FJException success) {
825 +                        checkCompletedAbnormally(f, success);
826 +                    }
827 +                    f.reinitialize();
828 +                    checkNotDone(f);
829 +                }
830              }};
831          testInvokeOnPool(mainPool(), a);
832      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines