17 |
|
} |
18 |
|
|
19 |
|
/** |
20 |
< |
* Create a map from Integers 1-5 to Strings "A"-"E". |
20 |
> |
* Returns a new map from Integers 1-5 to Strings "A"-"E". |
21 |
|
*/ |
22 |
|
private static ConcurrentSkipListMap map5() { |
23 |
|
ConcurrentSkipListMap map = new ConcurrentSkipListMap(); |
38 |
|
public void testClear() { |
39 |
|
ConcurrentSkipListMap map = map5(); |
40 |
|
map.clear(); |
41 |
< |
assertEquals(map.size(), 0); |
41 |
> |
assertEquals(0, map.size()); |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
< |
* |
45 |
> |
* copy constructor creates map equal to source map |
46 |
|
*/ |
47 |
|
public void testConstructFromSorted() { |
48 |
|
ConcurrentSkipListMap map = map5(); |
174 |
|
last = k; |
175 |
|
++count; |
176 |
|
} |
177 |
< |
assertEquals(count ,5); |
177 |
> |
assertEquals(5, count); |
178 |
|
} |
179 |
|
|
180 |
|
/** |
193 |
|
last = k; |
194 |
|
++count; |
195 |
|
} |
196 |
< |
assertEquals(count ,5); |
196 |
> |
assertEquals(5, count); |
197 |
|
} |
198 |
|
|
199 |
|
/** |
212 |
|
last = k; |
213 |
|
++count; |
214 |
|
} |
215 |
< |
assertEquals(count, 5); |
215 |
> |
assertEquals(5, count); |
216 |
|
} |
217 |
|
|
218 |
|
/** |
231 |
|
last = k; |
232 |
|
++count; |
233 |
|
} |
234 |
< |
assertEquals(count, 5); |
234 |
> |
assertEquals(5, count); |
235 |
|
} |
236 |
|
|
237 |
|
/** |
501 |
|
* lowerEntry, higherEntry, ceilingEntry, and floorEntry return |
502 |
|
* immutable entries |
503 |
|
*/ |
504 |
< |
public void testEntryImmutablity() { |
504 |
> |
public void testEntryImmutability() { |
505 |
|
ConcurrentSkipListMap map = map5(); |
506 |
|
Map.Entry e = map.lowerEntry(three); |
507 |
|
assertEquals(two, e.getKey()); |
986 |
|
static NavigableMap<Integer, Integer> newMap(Class cl) throws Exception { |
987 |
|
NavigableMap<Integer, Integer> result = |
988 |
|
(NavigableMap<Integer, Integer>) cl.newInstance(); |
989 |
< |
assertEquals(result.size(), 0); |
989 |
> |
assertEquals(0, result.size()); |
990 |
|
assertFalse(result.keySet().iterator().hasNext()); |
991 |
|
return result; |
992 |
|
} |
1213 |
|
if (bsContainsI) |
1214 |
|
size++; |
1215 |
|
} |
1216 |
< |
assertEquals(map.size(), size); |
1216 |
> |
assertEquals(size, map.size()); |
1217 |
|
|
1218 |
|
// Test contents using contains keySet iterator |
1219 |
|
int size2 = 0; |