diff options
Diffstat (limited to 'jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java')
-rw-r--r-- | jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java b/jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java index 17201f37f9..18a9e37e91 100644 --- a/jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java +++ b/jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java @@ -6,10 +6,29 @@ package jsr166; -import junit.framework.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.NavigableMap; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; + +import junit.framework.Test; +import junit.framework.TestSuite; public class TreeSubMapTest extends JSR166TestCase { + // android-note: Removed because the CTS runner does a bad job of + // retrying tests that have suite() declarations. + // + // public static void main(String[] args) { + // main(suite(), args); + // } + // public static Test suite() { + // return new TestSuite(...); + // } /** * Returns a new map from Integers 1-5 to Strings "A"-"E". @@ -378,8 +397,8 @@ public class TreeSubMapTest extends JSR166TestCase { * get(null) of nonempty map throws NPE */ public void testGet_NullPointerException() { + NavigableMap c = map5(); try { - NavigableMap c = map5(); c.get(null); shouldThrow(); } catch (NullPointerException success) {} @@ -389,8 +408,8 @@ public class TreeSubMapTest extends JSR166TestCase { * containsKey(null) of nonempty map throws NPE */ public void testContainsKey_NullPointerException() { + NavigableMap c = map5(); try { - NavigableMap c = map5(); c.containsKey(null); shouldThrow(); } catch (NullPointerException success) {} @@ -400,8 +419,8 @@ public class TreeSubMapTest extends JSR166TestCase { * put(null,x) throws NPE */ public void testPut1_NullPointerException() { + NavigableMap c = map5(); try { - NavigableMap c = map5(); c.put(null, "whatever"); shouldThrow(); } catch (NullPointerException success) {} @@ -411,8 +430,8 @@ public class TreeSubMapTest extends JSR166TestCase { * remove(null) throws NPE */ public void testRemove1_NullPointerException() { + NavigableMap c = map5(); try { - NavigableMap c = map5(); c.remove(null); shouldThrow(); } catch (NullPointerException success) {} @@ -927,8 +946,8 @@ public class TreeSubMapTest extends JSR166TestCase { * get(null) of nonempty map throws NPE */ public void testDescendingGet_NullPointerException() { + NavigableMap c = dmap5(); try { - NavigableMap c = dmap5(); c.get(null); shouldThrow(); } catch (NullPointerException success) {} @@ -938,8 +957,8 @@ public class TreeSubMapTest extends JSR166TestCase { * put(null,x) throws NPE */ public void testDescendingPut1_NullPointerException() { + NavigableMap c = dmap5(); try { - NavigableMap c = dmap5(); c.put(null, "whatever"); shouldThrow(); } catch (NullPointerException success) {} |