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

Comparing jsr166/src/test/tck/LongAccumulatorTest.java (file contents):
Revision 1.3 by jsr166, Fri Mar 22 16:10:19 2013 UTC vs.
Revision 1.6 by jsr166, Fri Oct 16 16:32:15 2015 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.Executors;
8 > import java.util.concurrent.ExecutorService;
9 > import java.util.concurrent.Phaser;
10   import java.util.concurrent.atomic.LongAccumulator;
11  
12 + import junit.framework.Test;
13 + import junit.framework.TestSuite;
14 +
15   public class LongAccumulatorTest 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(LongAccumulatorTest.class);
# Line 38 | Line 42 | public class LongAccumulatorTest extends
42      }
43  
44      /**
45 <     * reset zeroes get
45 >     * reset() causes subsequent get() to return zero
46       */
47      public void testReset() {
48          LongAccumulator ai = new LongAccumulator(Long::max, 0L);
# Line 49 | Line 53 | public class LongAccumulatorTest extends
53      }
54  
55      /**
56 <     * getThenReset returns get then zeros
56 >     * getThenReset() returns current value; subsequent get() returns zero
57       */
58      public void testGetThenReset() {
59          LongAccumulator ai = new LongAccumulator(Long::max, 0L);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines