82 |
|
Map m = new LinkedHashMap(); |
83 |
|
for (int i=0; i<mapSize; i++) |
84 |
|
if (m.put(new Integer(i), new Integer(2*i)) != null) |
85 |
< |
throw new Exception("put returns non-null value erroenously."); |
85 |
> |
throw new Exception("put returns non-null value erroneously."); |
86 |
|
for (int i=0; i<2*mapSize; i++) |
87 |
|
if (m.containsValue(new Integer(i)) != (i%2==0)) |
88 |
|
throw new Exception("contains value "+i); |
89 |
|
if (m.put(nil, nil) == null) |
90 |
< |
throw new Exception("put returns a null value erroenously."); |
90 |
> |
throw new Exception("put returns a null value erroneously."); |
91 |
|
Map m2 = new LinkedHashMap(); m2.putAll(m); |
92 |
|
if (!m.equals(m2)) |
93 |
|
throw new Exception("Clone not equal to original. (1)"); |