11 |
|
|
12 |
|
public class ConcurrentSkipListMapTest extends JSR166TestCase { |
13 |
|
public static void main(String[] args) { |
14 |
< |
junit.textui.TestRunner.run (suite()); |
14 |
> |
junit.textui.TestRunner.run(suite()); |
15 |
|
} |
16 |
|
public static Test suite() { |
17 |
|
return new TestSuite(ConcurrentSkipListMapTest.class); |
427 |
|
map.remove(four, "A"); |
428 |
|
assertEquals(4, map.size()); |
429 |
|
assertTrue(map.containsKey(four)); |
430 |
– |
|
430 |
|
} |
431 |
|
|
432 |
|
/** |
445 |
|
|
446 |
|
Map.Entry e4 = map.lowerEntry(zero); |
447 |
|
assertNull(e4); |
449 |
– |
|
448 |
|
} |
449 |
|
|
450 |
|
/** |
463 |
|
|
464 |
|
Map.Entry e4 = map.higherEntry(six); |
465 |
|
assertNull(e4); |
468 |
– |
|
466 |
|
} |
467 |
|
|
468 |
|
/** |
481 |
|
|
482 |
|
Map.Entry e4 = map.floorEntry(zero); |
483 |
|
assertNull(e4); |
487 |
– |
|
484 |
|
} |
485 |
|
|
486 |
|
/** |
499 |
|
|
500 |
|
Map.Entry e4 = map.ceilingEntry(six); |
501 |
|
assertNull(e4); |
506 |
– |
|
502 |
|
} |
503 |
|
|
504 |
|
/** |
505 |
|
* lowerEntry, higherEntry, ceilingEntry, and floorEntry return |
506 |
< |
* imutable entries |
506 |
> |
* immutable entries |
507 |
|
*/ |
508 |
|
public void testEntryImmutablity() { |
509 |
|
ConcurrentSkipListMap map = map5(); |
551 |
|
|
552 |
|
Object e4 = q.lowerKey(zero); |
553 |
|
assertNull(e4); |
559 |
– |
|
554 |
|
} |
555 |
|
|
556 |
|
/** |
569 |
|
|
570 |
|
Object e4 = q.higherKey(six); |
571 |
|
assertNull(e4); |
578 |
– |
|
572 |
|
} |
573 |
|
|
574 |
|
/** |
587 |
|
|
588 |
|
Object e4 = q.floorKey(zero); |
589 |
|
assertNull(e4); |
597 |
– |
|
590 |
|
} |
591 |
|
|
592 |
|
/** |
605 |
|
|
606 |
|
Object e4 = q.ceilingKey(six); |
607 |
|
assertNull(e4); |
616 |
– |
|
608 |
|
} |
609 |
|
|
610 |
|
/** |
1192 |
|
// BitSet should support this! Test would run much faster |
1193 |
|
while (key >= min) { |
1194 |
|
if (bs.get(key)) |
1195 |
< |
return(key); |
1195 |
> |
return key; |
1196 |
|
key--; |
1197 |
|
} |
1198 |
|
return -1; |