1 |
/* |
2 |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
* Expert Group and released to the public domain, as explained at |
4 |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
*/ |
6 |
|
7 |
import junit.framework.*; |
8 |
import java.util.concurrent.ForkJoinPool; |
9 |
import java.util.concurrent.ForkJoinTask; |
10 |
import java.util.concurrent.ForkJoinWorkerThread; |
11 |
|
12 |
public class ForkJoinPool8Test extends JSR166TestCase { |
13 |
public static void main(String[] args) { |
14 |
junit.textui.TestRunner.run(suite()); |
15 |
} |
16 |
|
17 |
public static Test suite() { |
18 |
return new TestSuite(ForkJoinPool8Test.class); |
19 |
} |
20 |
|
21 |
// XXXX Just a skeleton implementation for now. |
22 |
public void testTODO() { |
23 |
fail("Please add some real tests!"); |
24 |
} |
25 |
|
26 |
/** |
27 |
* Common pool exists and has expected parallelism. |
28 |
*/ |
29 |
public void testCommonPoolParallelism() { |
30 |
assertEquals(ForkJoinPool.getCommonPoolParallelism(), |
31 |
ForkJoinPool.commonPool().getParallelism()); |
32 |
} |
33 |
} |