17 |
|
import java.util.concurrent.CopyOnWriteArrayList; |
18 |
|
|
19 |
|
import junit.framework.Test; |
20 |
– |
import junit.framework.TestSuite; |
20 |
|
|
21 |
|
public class CopyOnWriteArrayListTest extends JSR166TestCase { |
22 |
|
|
26 |
|
|
27 |
|
public static Test suite() { |
28 |
|
class Implementation implements CollectionImplementation { |
29 |
< |
public Class<?> klazz() { return ArrayList.class; } |
29 |
> |
public Class<?> klazz() { return CopyOnWriteArrayList.class; } |
30 |
|
public List emptyCollection() { return new CopyOnWriteArrayList(); } |
31 |
|
public Object makeElement(int i) { return i; } |
32 |
|
public boolean isConcurrent() { return true; } |
747 |
|
} |
748 |
|
|
749 |
|
/** |
750 |
< |
* a deserialized serialized list is equal |
750 |
> |
* a deserialized/reserialized list equals original |
751 |
|
*/ |
752 |
|
public void testSerialization() throws Exception { |
753 |
|
List x = populatedArray(SIZE); |