--- jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2012/02/21 02:04:17 1.28 +++ jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2013/04/02 22:18:25 1.29 @@ -685,6 +685,17 @@ public class ConcurrentSkipListSetTest e 0, setSize - 1, true, bs); } + /** + * addAll is idempotent + */ + public void testAddAll_idempotent() throws Exception { + Set x = populatedSet(SIZE); + Set y = new ConcurrentSkipListSet(x); + y.addAll(x); + assertEquals(x, y); + assertEquals(y, x); + } + static NavigableSet newSet(Class cl) throws Exception { NavigableSet result = (NavigableSet) cl.newInstance(); assertEquals(0, result.size());