16 |
|
} |
17 |
|
|
18 |
|
/** |
19 |
< |
* Create a map from Integers 1-5 to Strings "A"-"E". |
19 |
> |
* Returns a new map from Integers 1-5 to Strings "A"-"E". |
20 |
|
*/ |
21 |
|
private static TreeMap map5() { |
22 |
|
TreeMap map = new TreeMap(); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
< |
* |
44 |
> |
* copy constructor creates map equal to source map |
45 |
|
*/ |
46 |
|
public void testConstructFromSorted() { |
47 |
|
TreeMap map = map5(); |
600 |
|
NavigableMap x = map5(); |
601 |
|
NavigableMap y = serialClone(x); |
602 |
|
|
603 |
< |
assertTrue(x != y); |
603 |
> |
assertNotSame(x, y); |
604 |
|
assertEquals(x.size(), y.size()); |
605 |
|
assertEquals(x.toString(), y.toString()); |
606 |
|
assertEquals(x, y); |