Clover Coverage Report - Backport Util Concurrent v3.0
Coverage timestamp: Fri May 9 2008 11:05:23 EST
313   623   125   6.96
18   520   0.4   22.5
45     2.78  
2    
 
  CyclicBarrierTest       Line # 14 312 124 82.6% 0.8262032
  CyclicBarrierTest.MyAction       Line # 23 1 1 100% 1.0
 
  (18)
 
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/licenses/publicdomain
5    * Other contributors include Andrew Wright, Jeffrey Hayes,
6    * Pat Fisher, Mike Judd.
7    */
8   
9    import junit.framework.*;
10    import edu.emory.mathcs.backport.java.util.*;
11    import edu.emory.mathcs.backport.java.util.concurrent.*;
12    import edu.emory.mathcs.backport.java.util.concurrent.atomic.*;
13   
 
14    public class CyclicBarrierTest extends JSR166TestCase{
 
15  0 toggle public static void main(String[] args) {
16  0 junit.textui.TestRunner.run (suite());
17    }
 
18  1 toggle public static Test suite() {
19  1 return new TestSuite(CyclicBarrierTest.class);
20    }
21   
22    private volatile int countAction;
 
23    private class MyAction implements Runnable {
 
24  2 toggle public void run() { ++countAction; }
25    }
26   
27    /**
28    * Creating with negative parties throws IAE
29    */
 
30  1 toggle public void testConstructor1() {
31  1 try {
32  1 new CyclicBarrier(-1, (Runnable)null);
33