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.16 by jsr166, Sat Oct 9 19:30:35 2010 UTC vs.
Revision 1.18 by jsr166, Fri May 27 19:26:42 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   * Other contributors include Andrew Wright, Jeffrey Hayes,
6   * Pat Fisher, Mike Judd.
7   */
# Line 49 | Line 49 | public class CopyOnWriteArraySetTest ext
49              assertTrue(a.contains(ints[i]));
50      }
51  
52
52      /**
53       * addAll adds each element from the given collection
54       */
# Line 131 | Line 130 | public class CopyOnWriteArraySetTest ext
130          assertEquals(a.hashCode(), b.hashCode());
131      }
132  
134
133      /**
134       * containsAll returns true for collections with subset of elements
135       */
# Line 187 | Line 185 | public class CopyOnWriteArraySetTest ext
185          CopyOnWriteArraySet full = populatedSet(3);
186          String s = full.toString();
187          for (int i = 0; i < 3; ++i) {
188 <            assertTrue(s.indexOf(String.valueOf(i)) >= 0);
188 >            assertTrue(s.contains(String.valueOf(i)));
189          }
190      }
191  
194
192      /**
193       * removeAll removes all elements from the given collection
194       */
# Line 204 | Line 201 | public class CopyOnWriteArraySetTest ext
201          assertEquals(1, full.size());
202      }
203  
207
204      /**
205       * remove removes an element
206       */
# Line 251 | Line 247 | public class CopyOnWriteArraySetTest ext
247          assertEquals(2, (int) i[2]);
248      }
249  
254
250      /**
251       * toArray throws an ArrayStoreException when the given array can
252       * not store the objects inside the set

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines