22 |
|
main(suite(), args); |
23 |
|
} |
24 |
|
public static Test suite() { |
25 |
< |
return new TestSuite(CopyOnWriteArraySetTest.class); |
25 |
> |
class Implementation implements CollectionImplementation { |
26 |
> |
public Class<?> klazz() { return CopyOnWriteArraySet.class; } |
27 |
> |
public Set emptyCollection() { return new CopyOnWriteArraySet(); } |
28 |
> |
public Object makeElement(int i) { return i; } |
29 |
> |
public boolean isConcurrent() { return true; } |
30 |
> |
public boolean permitsNulls() { return true; } |
31 |
> |
} |
32 |
> |
return newTestSuite( |
33 |
> |
CopyOnWriteArraySetTest.class, |
34 |
> |
CollectionTest.testSuite(new Implementation())); |
35 |
|
} |
36 |
|
|
37 |
|
static CopyOnWriteArraySet<Integer> populatedSet(int n) { |
385 |
|
} |
386 |
|
|
387 |
|
/** |
388 |
< |
* A deserialized serialized set is equal |
388 |
> |
* A deserialized/reserialized set equals original |
389 |
|
*/ |
390 |
|
public void testSerialization() throws Exception { |
391 |
|
Set x = populatedSet(SIZE); |