14 |
|
|
15 |
|
public class DoubleAccumulatorTest 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(DoubleAccumulatorTest.class); |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
< |
* reset zeroes get |
45 |
> |
* reset() causes subsequent get() to return zero |
46 |
|
*/ |
47 |
|
public void testReset() { |
48 |
|
DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); |
53 |
|
} |
54 |
|
|
55 |
|
/** |
56 |
< |
* getThenReset returns get then zeros |
56 |
> |
* getThenReset() returns current value; subsequent get() returns zero |
57 |
|
*/ |
58 |
|
public void testGetThenReset() { |
59 |
|
DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0); |