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 |
5 |
< |
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
< |
* Pat Fisher, Mike Judd. |
5 |
> |
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
> |
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
|
import java.util.concurrent.atomic.*; |
27 |
|
*/ |
28 |
|
public void testConstructor(){ |
29 |
|
try{ |
30 |
< |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
30 |
> |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
31 |
|
a = AtomicLongFieldUpdater.newUpdater |
32 |
|
(AtomicLongFieldUpdaterTest.class, "y"); |
33 |
|
shouldThrow(); |
40 |
|
*/ |
41 |
|
public void testConstructor2(){ |
42 |
|
try{ |
43 |
< |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
43 |
> |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
44 |
|
a = AtomicLongFieldUpdater.newUpdater |
45 |
|
(AtomicLongFieldUpdaterTest.class, "z"); |
46 |
|
shouldThrow(); |
53 |
|
*/ |
54 |
|
public void testConstructor3(){ |
55 |
|
try{ |
56 |
< |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
56 |
> |
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> |
57 |
|
a = AtomicLongFieldUpdater.newUpdater |
58 |
|
(AtomicLongFieldUpdaterTest.class, "w"); |
59 |
|
shouldThrow(); |
151 |
|
|
152 |
|
/** |
153 |
|
* repeated weakCompareAndSet succeeds in changing value when equal |
154 |
< |
* to expected |
154 |
> |
* to expected |
155 |
|
*/ |
156 |
|
public void testWeakCompareAndSet(){ |
157 |
|
AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a; |