27 |
|
} |
28 |
|
|
29 |
|
/** |
30 |
< |
* default constructed intializes to false |
30 |
> |
* default constructed initializes to false |
31 |
|
*/ |
32 |
|
public void testConstructor2() { |
33 |
|
AtomicBoolean ai = new AtomicBoolean(); |
131 |
|
} |
132 |
|
} |
133 |
|
|
134 |
+ |
/** |
135 |
+ |
* toString returns current value. |
136 |
+ |
*/ |
137 |
+ |
public void testToString() { |
138 |
+ |
AtomicBoolean ai = new AtomicBoolean(); |
139 |
+ |
assertEquals(ai.toString(), Boolean.toString(false)); |
140 |
+ |
ai.set(true); |
141 |
+ |
assertEquals(ai.toString(), Boolean.toString(true)); |
142 |
+ |
} |
143 |
|
|
144 |
|
} |