ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ConcurrentSkipListMapTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ConcurrentSkipListMapTest.java (file contents):
Revision 1.6 by dl, Wed Apr 19 15:10:54 2006 UTC vs.
Revision 1.7 by dl, Thu Apr 20 20:35:00 2006 UTC

# Line 798 | Line 798 | public class ConcurrentSkipListMapTest e
798       */
799      public void testSubMapContents() {
800          ConcurrentSkipListMap map = map5();
801 <        NavigableMap sm = map.navigableSubMap(two, true, four, false);
801 >        NavigableMap sm = map.subMap(two, true, four, false);
802          assertEquals(two, sm.firstKey());
803          assertEquals(three, sm.lastKey());
804          assertEquals(2, sm.size());
# Line 836 | Line 836 | public class ConcurrentSkipListMapTest e
836  
837      public void testSubMapContents2() {
838          ConcurrentSkipListMap map = map5();
839 <        NavigableMap sm = map.navigableSubMap(two, true, three, false);
839 >        NavigableMap sm = map.subMap(two, true, three, false);
840          assertEquals(1, sm.size());
841          assertEquals(two, sm.firstKey());
842          assertEquals(two, sm.lastKey());
# Line 871 | Line 871 | public class ConcurrentSkipListMapTest e
871       */
872      public void testHeadMapContents() {
873          ConcurrentSkipListMap map = map5();
874 <        NavigableMap sm = map.navigableHeadMap(four, false);
874 >        NavigableMap sm = map.headMap(four, false);
875          assertTrue(sm.containsKey(one));
876          assertTrue(sm.containsKey(two));
877          assertTrue(sm.containsKey(three));
# Line 897 | Line 897 | public class ConcurrentSkipListMapTest e
897       */
898      public void testTailMapContents() {
899          ConcurrentSkipListMap map = map5();
900 <        NavigableMap sm = map.navigableTailMap(two, true);
900 >        NavigableMap sm = map.tailMap(two, true);
901          assertFalse(sm.containsKey(one));
902          assertTrue(sm.containsKey(two));
903          assertTrue(sm.containsKey(three));
# Line 941 | Line 941 | public class ConcurrentSkipListMapTest e
941          assertEquals("E", e.getValue());
942          assertFalse(i.hasNext());
943  
944 <        NavigableMap ssm = sm.navigableTailMap(four, true);
944 >        NavigableMap ssm = sm.tailMap(four, true);
945          assertEquals(four, ssm.firstKey());
946          assertEquals(five, ssm.lastKey());
947          assertTrue(ssm.remove(four) != null);
# Line 970 | Line 970 | public class ConcurrentSkipListMapTest e
970          check(map,                 0, mapSize - 1, true);
971          check(map.descendingMap(), 0, mapSize - 1, false);
972  
973 <        bashSubMap(map.navigableSubMap(0, true, mapSize, false),
973 >        bashSubMap(map.subMap(0, true, mapSize, false),
974                     0, mapSize - 1, true);
975      }
976  
# Line 1077 | Line 1077 | public class ConcurrentSkipListMapTest e
1077  
1078          // headMap - pick direction and endpoint inclusion randomly
1079          boolean incl = rnd.nextBoolean();
1080 <        NavigableMap<Integer,Integer> hm = map.navigableHeadMap(midPoint, incl);
1080 >        NavigableMap<Integer,Integer> hm = map.headMap(midPoint, incl);
1081          if (ascending) {
1082              if (rnd.nextBoolean())
1083                  bashSubMap(hm, min, midPoint - (incl ? 0 : 1), true);
# Line 1094 | Line 1094 | public class ConcurrentSkipListMapTest e
1094  
1095          // tailMap - pick direction and endpoint inclusion randomly
1096          incl = rnd.nextBoolean();
1097 <        NavigableMap<Integer,Integer> tm = map.navigableTailMap(midPoint,incl);
1097 >        NavigableMap<Integer,Integer> tm = map.tailMap(midPoint,incl);
1098          if (ascending) {
1099              if (rnd.nextBoolean())
1100                  bashSubMap(tm, midPoint + (incl ? 0 : 1), max, true);
# Line 1119 | Line 1119 | public class ConcurrentSkipListMapTest e
1119          boolean lowIncl = rnd.nextBoolean();
1120          boolean highIncl = rnd.nextBoolean();
1121          if (ascending) {
1122 <            NavigableMap<Integer,Integer> sm = map.navigableSubMap(
1122 >            NavigableMap<Integer,Integer> sm = map.subMap(
1123                  endpoints[0], lowIncl, endpoints[1], highIncl);
1124              if (rnd.nextBoolean())
1125                  bashSubMap(sm, endpoints[0] + (lowIncl ? 0 : 1),
# Line 1128 | Line 1128 | public class ConcurrentSkipListMapTest e
1128                  bashSubMap(sm.descendingMap(), endpoints[0] + (lowIncl ? 0 : 1),
1129                             endpoints[1] - (highIncl ? 0 : 1), false);
1130          } else {
1131 <            NavigableMap<Integer,Integer> sm = map.navigableSubMap(
1131 >            NavigableMap<Integer,Integer> sm = map.subMap(
1132                  endpoints[1], highIncl, endpoints[0], lowIncl);
1133              if (rnd.nextBoolean())
1134                  bashSubMap(sm, endpoints[0] + (lowIncl ? 0 : 1),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines