ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/CopyOnWriteArraySetTest.java
(Generate patch)

Comparing jsr166/src/test/tck/CopyOnWriteArraySetTest.java (file contents):
Revision 1.38 by jsr166, Wed Jan 4 06:09:58 2017 UTC vs.
Revision 1.41 by jsr166, Tue May 8 00:25:33 2018 UTC

# Line 15 | Line 15 | import java.util.Set;
15   import java.util.concurrent.CopyOnWriteArraySet;
16  
17   import junit.framework.Test;
18 import junit.framework.TestSuite;
18  
19   public class CopyOnWriteArraySetTest extends JSR166TestCase {
20      public static void main(String[] args) {
21          main(suite(), args);
22      }
23      public static Test suite() {
24 <        return new TestSuite(CopyOnWriteArraySetTest.class);
24 >        class Implementation implements CollectionImplementation {
25 >            public Class<?> klazz() { return CopyOnWriteArraySet.class; }
26 >            public Set emptyCollection() { return new CopyOnWriteArraySet(); }
27 >            public Object makeElement(int i) { return i; }
28 >            public boolean isConcurrent() { return true; }
29 >            public boolean permitsNulls() { return true; }
30 >        }
31 >        return newTestSuite(
32 >                CopyOnWriteArraySetTest.class,
33 >                CollectionTest.testSuite(new Implementation()));
34      }
35  
36      static CopyOnWriteArraySet<Integer> populatedSet(int n) {
# Line 376 | Line 384 | public class CopyOnWriteArraySetTest ext
384      }
385  
386      /**
387 <     * A deserialized serialized set is equal
387 >     * A deserialized/reserialized set equals original
388       */
389      public void testSerialization() throws Exception {
390          Set x = populatedSet(SIZE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines