10 |
|
import java.util.Iterator; |
11 |
|
import java.util.NavigableSet; |
12 |
|
import java.util.SortedSet; |
13 |
+ |
import java.util.Set; |
14 |
|
import java.util.TreeSet; |
15 |
|
|
16 |
|
public class TreeSubSetTest extends JSR166TestCase { |
1106 |
|
assertEquals(4, set.size()); |
1107 |
|
} |
1108 |
|
|
1109 |
+ |
/** |
1110 |
+ |
* addAll is idempotent |
1111 |
+ |
*/ |
1112 |
+ |
public void testAddAll_idempotent() throws Exception { |
1113 |
+ |
Set x = populatedSet(SIZE); |
1114 |
+ |
Set y = new TreeSet(x); |
1115 |
+ |
y.addAll(x); |
1116 |
+ |
assertEquals(x, y); |
1117 |
+ |
assertEquals(y, x); |
1118 |
+ |
} |
1119 |
+ |
|
1120 |
|
} |