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

Comparing jsr166/src/test/tck/DoubleAdderTest.java (file contents):
Revision 1.4 by jsr166, Sun Jul 14 19:49:01 2013 UTC vs.
Revision 1.8 by jsr166, Fri Aug 4 03:30:21 2017 UTC

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 < import junit.framework.*;
8 < import java.util.concurrent.*;
7 > import java.util.concurrent.CyclicBarrier;
8 > import java.util.concurrent.Executors;
9 > import java.util.concurrent.ExecutorService;
10   import java.util.concurrent.atomic.DoubleAdder;
11  
12 + import junit.framework.Test;
13 + import junit.framework.TestSuite;
14 +
15   public class DoubleAdderTest extends JSR166TestCase {
16      public static void main(String[] args) {
17 <        junit.textui.TestRunner.run(suite());
17 >        main(suite(), args);
18      }
19      public static Test suite() {
20          return new TestSuite(DoubleAdderTest.class);
# Line 36 | Line 40 | public class DoubleAdderTest extends JSR
40      }
41  
42      /**
43 <     * reset zeroes sum
43 >     * reset() causes subsequent sum() to return zero
44       */
45      public void testReset() {
46          DoubleAdder ai = new DoubleAdder();
# Line 47 | Line 51 | public class DoubleAdderTest extends JSR
51      }
52  
53      /**
54 <     * sumThenReset returns sum then zeros
54 >     * sumThenReset() returns sum; subsequent sum() returns zero
55       */
56      public void testSumThenReset() {
57          DoubleAdder ai = new DoubleAdder();
# Line 58 | Line 62 | public class DoubleAdderTest extends JSR
62      }
63  
64      /**
65 <     * a deserialized serialized adder holds same value
65 >     * a deserialized/reserialized adder holds same value
66       */
67      public void testSerialization() throws Exception {
68          DoubleAdder x = new DoubleAdder();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines