4 |
|
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
< |
import junit.framework.*; |
7 |
> |
import java.util.ArrayList; |
8 |
> |
import java.util.Arrays; |
9 |
> |
import java.util.Collection; |
10 |
> |
import java.util.Iterator; |
11 |
> |
import java.util.Map; |
12 |
> |
import java.util.NavigableMap; |
13 |
> |
import java.util.Set; |
14 |
> |
import java.util.SortedMap; |
15 |
|
import java.util.concurrent.ConcurrentNavigableMap; |
16 |
|
import java.util.concurrent.ConcurrentSkipListMap; |
17 |
< |
import java.util.*; |
17 |
> |
|
18 |
> |
import junit.framework.Test; |
19 |
> |
import junit.framework.TestSuite; |
20 |
|
|
21 |
|
public class ConcurrentSkipListSubMapTest extends JSR166TestCase { |
22 |
|
public static void main(String[] args) { |
27 |
|
} |
28 |
|
|
29 |
|
/** |
30 |
< |
* Creates a map from Integers 1-5 to Strings "A"-"E". |
30 |
> |
* Returns a new map from Integers 1-5 to Strings "A"-"E". |
31 |
|
*/ |
32 |
|
private static ConcurrentNavigableMap map5() { |
33 |
|
ConcurrentSkipListMap map = new ConcurrentSkipListMap(); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
< |
* Creates a map from Integers -5 to -1 to Strings "A"-"E". |
48 |
> |
* Returns a new map from Integers -5 to -1 to Strings "A"-"E". |
49 |
|
*/ |
50 |
|
private static ConcurrentNavigableMap dmap5() { |
51 |
|
ConcurrentSkipListMap map = new ConcurrentSkipListMap(); |
604 |
|
NavigableMap x = map5(); |
605 |
|
NavigableMap y = serialClone(x); |
606 |
|
|
607 |
< |
assertTrue(x != y); |
607 |
> |
assertNotSame(x, y); |
608 |
|
assertEquals(x.size(), y.size()); |
609 |
|
assertEquals(x.toString(), y.toString()); |
610 |
|
assertEquals(x, y); |
1278 |
|
NavigableMap x = dmap5(); |
1279 |
|
NavigableMap y = serialClone(x); |
1280 |
|
|
1281 |
< |
assertTrue(x != y); |
1281 |
> |
assertNotSame(x, y); |
1282 |
|
assertEquals(x.size(), y.size()); |
1283 |
|
assertEquals(x.toString(), y.toString()); |
1284 |
|
assertEquals(x, y); |