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 |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
10 |
|
import java.util.concurrent.atomic.*; |
11 |
|
|
12 |
|
public class AtomicMarkableReferenceTest extends JSR166TestCase { |
13 |
< |
public static void main (String[] args) { |
14 |
< |
junit.textui.TestRunner.run (suite()); |
13 |
> |
public static void main(String[] args) { |
14 |
> |
junit.textui.TestRunner.run(suite()); |
15 |
|
} |
16 |
|
public static Test suite() { |
17 |
|
return new TestSuite(AtomicMarkableReferenceTest.class); |
18 |
|
} |
19 |
|
|
20 |
|
/** |
21 |
< |
* constructor initializes to given reference and mark |
21 |
> |
* constructor initializes to given reference and mark |
22 |
|
*/ |
23 |
|
public void testConstructor() { |
24 |
|
AtomicMarkableReference ai = new AtomicMarkableReference(one, false); |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
< |
* get returns the last values of reference and mark set |
33 |
> |
* get returns the last values of reference and mark set |
34 |
|
*/ |
35 |
|
public void testGetSet() { |
36 |
|
boolean[] mark = new boolean[1]; |