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.20 by jsr166, Sat Oct 9 19:30:34 2010 UTC vs.
Revision 1.24 by jsr166, Fri May 27 19:21:27 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import junit.framework.*;
# Line 119 | Line 119 | public class ConcurrentSkipListMapTest e
119          assertEquals(five, map.lastKey());
120      }
121  
122
122      /**
123       * keySet.toArray returns contains all keys
124       */
# Line 382 | Line 381 | public class ConcurrentSkipListMapTest e
381          assertEquals("Z", map.get(one));
382      }
383  
385
384      /**
385       * replace value fails when the given key not mapped to expected value
386       */
# Line 403 | Line 401 | public class ConcurrentSkipListMapTest e
401          assertEquals("Z", map.get(one));
402      }
403  
406
404      /**
405       * remove removes the correct key-value pair from the map
406       */
# Line 534 | Line 531 | public class ConcurrentSkipListMapTest e
531      }
532  
533  
537
534      /**
535       * lowerKey returns preceding element
536       */
# Line 678 | Line 674 | public class ConcurrentSkipListMapTest e
674          ConcurrentSkipListMap map = map5();
675          String s = map.toString();
676          for (int i = 1; i <= 5; ++i) {
677 <            assertTrue(s.indexOf(String.valueOf(i)) >= 0);
677 >            assertTrue(s.contains(String.valueOf(i)));
678          }
679      }
680  
# Line 717 | Line 713 | public class ConcurrentSkipListMapTest e
713          } catch (NullPointerException success) {}
714      }
715  
720
716      /**
717       * put(null,x) throws NPE
718       */
# Line 814 | Line 809 | public class ConcurrentSkipListMapTest e
809          assertTrue(r.equals(q));
810      }
811  
817
818
812      /**
813       * subMap returns map with keys in requested range
814       */
# Line 980 | Line 973 | public class ConcurrentSkipListMapTest e
973       * Submaps of submaps subdivide correctly
974       */
975      public void testRecursiveSubMaps() throws Exception {
976 <        int mapSize = 1000;
976 >        int mapSize = expensiveTests ? 1000 : 100;
977          Class cl = ConcurrentSkipListMap.class;
978          NavigableMap<Integer, Integer> map = newMap(cl);
979          bs = new BitSet(mapSize);
# Line 1161 | Line 1154 | public class ConcurrentSkipListMapTest e
1154       */
1155      void check(NavigableMap<Integer, Integer> map,
1156                        final int min, final int max, final boolean ascending) {
1157 <       class ReferenceSet {
1157 >        class ReferenceSet {
1158              int lower(int key) {
1159                  return ascending ? lowerAscending(key) : higherAscending(key);
1160              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines