95 |
|
* repeated weakCompareAndSet succeeds in changing value when equal |
96 |
|
* to expected |
97 |
|
*/ |
98 |
+ |
@SuppressWarnings("deprecation") |
99 |
|
public void testWeakCompareAndSet() { |
100 |
|
AtomicBoolean ai = new AtomicBoolean(true); |
101 |
|
do {} while (!ai.weakCompareAndSet(true, false)); |
121 |
|
} |
122 |
|
|
123 |
|
/** |
124 |
< |
* a deserialized serialized atomic holds same value |
124 |
> |
* a deserialized/reserialized atomic holds same value |
125 |
|
*/ |
126 |
|
public void testSerialization() throws Exception { |
127 |
|
AtomicBoolean x = new AtomicBoolean(); |