use of java.util.concurrent.ConcurrentSkipListMap in project j2objc by google.
the class ConcurrentSkipListMapTest method testLowerEntry.
/**
* lowerEntry returns preceding entry.
*/
public void testLowerEntry() {
ConcurrentSkipListMap map = map5();
Map.Entry e1 = map.lowerEntry(three);
assertEquals(two, e1.getKey());
Map.Entry e2 = map.lowerEntry(six);
assertEquals(five, e2.getKey());
Map.Entry e3 = map.lowerEntry(one);
assertNull(e3);
Map.Entry e4 = map.lowerEntry(zero);
assertNull(e4);
}
use of java.util.concurrent.ConcurrentSkipListMap in project j2objc by google.
the class ConcurrentSkipListMapTest method testLastKey.
/**
* lastKey returns last key
*/
public void testLastKey() {
ConcurrentSkipListMap map = map5();
assertEquals(five, map.lastKey());
}
use of java.util.concurrent.ConcurrentSkipListMap in project j2objc by google.
the class ConcurrentSkipListMapTest method testReplaceValue_NullPointerException.
/**
* replace(null, x, y) throws NPE
*/
public void testReplaceValue_NullPointerException() {
ConcurrentSkipListMap c = map5();
try {
c.replace(null, one, "whatever");
shouldThrow();
} catch (NullPointerException success) {
}
}
use of java.util.concurrent.ConcurrentSkipListMap in project j2objc by google.
the class ConcurrentSkipListMapTest method testEquals.
/**
* Maps with same contents are equal
*/
public void testEquals() {
ConcurrentSkipListMap map1 = map5();
ConcurrentSkipListMap map2 = map5();
assertEquals(map1, map2);
assertEquals(map2, map1);
map1.clear();
assertFalse(map1.equals(map2));
assertFalse(map2.equals(map1));
}
use of java.util.concurrent.ConcurrentSkipListMap in project j2objc by google.
the class ConcurrentSkipListMapTest method testClear.
/**
* clear removes all pairs
*/
public void testClear() {
ConcurrentSkipListMap map = map5();
map.clear();
assertEquals(0, map.size());
}
Aggregations