4 |
|
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
< |
import junit.framework.*; |
8 |
< |
import java.util.*; |
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.TreeMap; |
16 |
> |
|
17 |
> |
import junit.framework.Test; |
18 |
> |
import junit.framework.TestSuite; |
19 |
|
|
20 |
|
public class TreeSubMapTest extends JSR166TestCase { |
21 |
|
public static void main(String[] args) { |
26 |
|
} |
27 |
|
|
28 |
|
/** |
29 |
< |
* Creates a map from Integers 1-5 to Strings "A"-"E". |
29 |
> |
* Returns a new map from Integers 1-5 to Strings "A"-"E". |
30 |
|
*/ |
31 |
|
private static NavigableMap map5() { |
32 |
|
TreeMap map = new TreeMap(); |
50 |
|
} |
51 |
|
|
52 |
|
/** |
53 |
< |
* Creates a map from Integers -5 to -1 to Strings "A"-"E". |
53 |
> |
* Returns a new map from Integers -5 to -1 to Strings "A"-"E". |
54 |
|
*/ |
55 |
|
private static NavigableMap dmap5() { |
56 |
|
TreeMap map = new TreeMap(); |
439 |
|
NavigableMap x = map5(); |
440 |
|
NavigableMap y = serialClone(x); |
441 |
|
|
442 |
< |
assertTrue(x != y); |
442 |
> |
assertNotSame(x, y); |
443 |
|
assertEquals(x.size(), y.size()); |
444 |
|
assertEquals(x.toString(), y.toString()); |
445 |
|
assertEquals(x, y); |
966 |
|
NavigableMap x = dmap5(); |
967 |
|
NavigableMap y = serialClone(x); |
968 |
|
|
969 |
< |
assertTrue(x != y); |
969 |
> |
assertNotSame(x, y); |
970 |
|
assertEquals(x.size(), y.size()); |
971 |
|
assertEquals(x.toString(), y.toString()); |
972 |
|
assertEquals(x, y); |