14 |
|
public class CopyOnWriteArrayListTest extends JSR166TestCase { |
15 |
|
|
16 |
|
public static void main(String[] args) { |
17 |
< |
junit.textui.TestRunner.run (suite()); |
17 |
> |
junit.textui.TestRunner.run(suite()); |
18 |
|
} |
19 |
|
|
20 |
|
public static Test suite() { |
240 |
|
/** |
241 |
|
* iterator.remove throws UnsupportedOperationException |
242 |
|
*/ |
243 |
< |
public void testIteratorRemove () { |
243 |
> |
public void testIteratorRemove() { |
244 |
|
CopyOnWriteArrayList full = populatedArray(SIZE); |
245 |
|
Iterator it = full.iterator(); |
246 |
|
it.next(); |
312 |
|
*/ |
313 |
|
public void testRemove() { |
314 |
|
CopyOnWriteArrayList full = populatedArray(3); |
315 |
< |
assertEquals(two, full.remove(2)); |
315 |
> |
assertEquals(2, full.remove(2)); |
316 |
|
assertEquals(2, full.size()); |
317 |
|
} |
318 |
|
|
333 |
|
*/ |
334 |
|
public void testSet() { |
335 |
|
CopyOnWriteArrayList full = populatedArray(3); |
336 |
< |
assertEquals(two, full.set(2, four)); |
336 |
> |
assertEquals(2, full.set(2, four)); |
337 |
|
assertEquals(4, full.get(2)); |
338 |
|
} |
339 |
|
|
593 |
|
} |
594 |
|
|
595 |
|
/** |
596 |
< |
* a deserialized serialiszed list is equal |
596 |
> |
* a deserialized serialized list is equal |
597 |
|
*/ |
598 |
|
public void testSerialization() throws Exception { |
599 |
|
CopyOnWriteArrayList q = populatedArray(SIZE); |