ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ForkJoinPool8Test.java
Revision: 1.1
Committed: Tue Feb 5 03:39:34 2013 UTC (11 years, 3 months ago) by jsr166
Branch: MAIN
Log Message:
add ForkJoinPool8Test

File Contents

# User Rev Content
1 jsr166 1.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     /**
22     * Common pool exists and has expected parallelism.
23     */
24     public void testCommonPoolParallelism() {
25     assertEquals(ForkJoinPool.getCommonPoolParallelism(),
26     ForkJoinPool.commonPool().getParallelism());
27     }
28     }