6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
– |
import junit.framework.*; |
9 |
|
import java.util.concurrent.atomic.AtomicBoolean; |
10 |
|
|
11 |
+ |
import junit.framework.Test; |
12 |
+ |
import junit.framework.TestSuite; |
13 |
+ |
|
14 |
|
public class AtomicBooleanTest extends JSR166TestCase { |
15 |
|
public static void main(String[] args) { |
16 |
|
junit.textui.TestRunner.run(suite()); |
134 |
|
*/ |
135 |
|
public void testToString() { |
136 |
|
AtomicBoolean ai = new AtomicBoolean(); |
137 |
< |
assertEquals(ai.toString(), Boolean.toString(false)); |
137 |
> |
assertEquals(Boolean.toString(false), ai.toString()); |
138 |
|
ai.set(true); |
139 |
< |
assertEquals(ai.toString(), Boolean.toString(true)); |
139 |
> |
assertEquals(Boolean.toString(true), ai.toString()); |
140 |
|
} |
141 |
|
|
142 |
|
} |