equal
deleted
inserted
replaced
42 import java.util.Random; |
42 import java.util.Random; |
43 import java.util.Set; |
43 import java.util.Set; |
44 import java.util.TreeMap; |
44 import java.util.TreeMap; |
45 |
45 |
46 import junit.framework.Test; |
46 import junit.framework.Test; |
47 import junit.framework.TestSuite; |
|
48 |
47 |
49 public class TreeMapTest extends JSR166TestCase { |
48 public class TreeMapTest extends JSR166TestCase { |
50 public static void main(String[] args) { |
49 public static void main(String[] args) { |
51 main(suite(), args); |
50 main(suite(), args); |
52 } |
51 } |
53 public static Test suite() { |
52 public static Test suite() { |
54 return new TestSuite(TreeMapTest.class); |
53 class Implementation implements MapImplementation { |
|
54 public Class<?> klazz() { return TreeMap.class; } |
|
55 public Map emptyMap() { return new TreeMap(); } |
|
56 public Object makeKey(int i) { return i; } |
|
57 public Object makeValue(int i) { return i; } |
|
58 public boolean isConcurrent() { return false; } |
|
59 public boolean permitsNullKeys() { return false; } |
|
60 public boolean permitsNullValues() { return true; } |
|
61 public boolean supportsSetValue() { return true; } |
|
62 } |
|
63 return newTestSuite( |
|
64 TreeMapTest.class, |
|
65 MapTest.testSuite(new Implementation())); |
55 } |
66 } |
56 |
67 |
57 /** |
68 /** |
58 * Returns a new map from Integers 1-5 to Strings "A"-"E". |
69 * Returns a new map from Integers 1-5 to Strings "A"-"E". |
59 */ |
70 */ |