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 |
|
*/ |
8 |
|
|
9 |
|
import junit.framework.*; |
10 |
< |
import java.util.concurrent.atomic.*; |
10 |
> |
import java.util.concurrent.atomic.AtomicStampedReference; |
11 |
|
|
12 |
|
public class AtomicStampedReferenceTest extends JSR166TestCase { |
13 |
|
public static void main(String[] args) { |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
< |
* get returns the last values of reference and stamp set |
33 |
> |
* get returns the last values of reference and stamp set |
34 |
|
*/ |
35 |
|
public void testGetSet() { |
36 |
|
int[] mark = new int[1]; |
52 |
|
} |
53 |
|
|
54 |
|
/** |
55 |
< |
* attemptStamp succeeds in single thread |
55 |
> |
* attemptStamp succeeds in single thread |
56 |
|
*/ |
57 |
|
public void testAttemptStamp() { |
58 |
|
int[] mark = new int[1]; |