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

Comparing jsr166/src/test/tck/CountedCompleterTest.java (file contents):
Revision 1.10 by jsr166, Thu Jun 6 00:40:13 2013 UTC vs.
Revision 1.16 by jsr166, Wed Dec 31 19:05:42 2014 UTC

# Line 3 | Line 3
3   * Expert Group and released to the public domain, as explained at
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6 < import java.util.concurrent.ExecutionException;
6 >
7 > import static java.util.concurrent.TimeUnit.MILLISECONDS;
8 > import static java.util.concurrent.TimeUnit.SECONDS;
9 >
10 > import java.util.HashSet;
11   import java.util.concurrent.CancellationException;
12 + import java.util.concurrent.CountedCompleter;
13 + import java.util.concurrent.ExecutionException;
14   import java.util.concurrent.ForkJoinPool;
15   import java.util.concurrent.ForkJoinTask;
10 import java.util.concurrent.CountedCompleter;
11 import java.util.concurrent.ForkJoinWorkerThread;
12 import java.util.concurrent.RecursiveAction;
13 import java.util.concurrent.TimeUnit;
16   import java.util.concurrent.TimeoutException;
17   import java.util.concurrent.atomic.AtomicInteger;
16 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
18   import java.util.concurrent.atomic.AtomicReference;
19 < import static java.util.concurrent.TimeUnit.MILLISECONDS;
20 < import static java.util.concurrent.TimeUnit.SECONDS;
21 < import java.util.HashSet;
21 < import junit.framework.*;
19 >
20 > import junit.framework.Test;
21 > import junit.framework.TestSuite;
22  
23   public class CountedCompleterTest extends JSR166TestCase {
24  
# Line 212 | Line 212 | public class CountedCompleterTest extend
212          final AtomicInteger onCompletionN = new AtomicInteger(0);
213          final AtomicInteger onExceptionalCompletionN = new AtomicInteger(0);
214          final AtomicInteger setRawResultN = new AtomicInteger(0);
215 <        final AtomicReference<Object> rawResult = new AtomicReference<>(null);
215 >        final AtomicReference<Object> rawResult = new AtomicReference<Object>(null);
216          int computeN() { return computeN.get(); }
217          int onCompletionN() { return onCompletionN.get(); }
218          int onExceptionalCompletionN() { return onExceptionalCompletionN.get(); }
# Line 499 | Line 499 | public class CountedCompleterTest extend
499      // Invocation tests use some interdependent task classes
500      // to better test propagation etc
501  
502 <
503 <    // Version of Fibonacci with different classes for left vs right forks
502 >    /**
503 >     * Version of Fibonacci with different classes for left vs right forks
504 >     */
505      abstract class CCF extends CheckedCC {
506          int number;
507          int rnumber;
# Line 1136 | Line 1137 | public class CountedCompleterTest extend
1137      }
1138  
1139      /**
1140 <     * invokeAll(collection)  throws exception if any task does
1140 >     * invokeAll(collection) throws exception if any task does
1141       */
1142      public void testAbnormalInvokeAllCollection() {
1143          ForkJoinTask a = new CheckedRecursiveAction() {
# Line 1801 | Line 1802 | public class CountedCompleterTest extend
1802      }
1803  
1804      /**
1805 <     * invokeAll(collection)  throws exception if any task does
1805 >     * invokeAll(collection) throws exception if any task does
1806       */
1807      public void testAbnormalInvokeAllCollectionSingleton() {
1808          ForkJoinTask a = new CheckedRecursiveAction() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines