--- jsr166/src/test/tck/ThreadLocalRandomTest.java 2009/07/31 23:37:31 1.2 +++ jsr166/src/test/tck/ThreadLocalRandomTest.java 2009/11/21 02:07:27 1.4 @@ -11,10 +11,10 @@ import java.util.*; public class ThreadLocalRandomTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run (suite()); + junit.textui.TestRunner.run (suite()); } public static Test suite() { - return new TestSuite(ThreadLocalRandomTest.class); + return new TestSuite(ThreadLocalRandomTest.class); } /** @@ -41,6 +41,7 @@ public class ThreadLocalRandomTest exten public void testSetSeed() { try { ThreadLocalRandom.current().setSeed(17); + shouldThrow(); } catch (UnsupportedOperationException success) { } } @@ -119,6 +120,7 @@ public class ThreadLocalRandomTest exten public void testNextIntBoundedNeg() { try { int f = ThreadLocalRandom.current().nextInt(-17); + shouldThrow(); } catch (IllegalArgumentException success) { } } @@ -129,6 +131,7 @@ public class ThreadLocalRandomTest exten public void testNextIntBadBounds() { try { int f = ThreadLocalRandom.current().nextInt(17, 2); + shouldThrow(); } catch (IllegalArgumentException success) { } } @@ -182,6 +185,7 @@ public class ThreadLocalRandomTest exten public void testNextLongBoundedNeg() { try { long f = ThreadLocalRandom.current().nextLong(-17); + shouldThrow(); } catch (IllegalArgumentException success) { } } @@ -192,6 +196,7 @@ public class ThreadLocalRandomTest exten public void testNextLongBadBounds() { try { long f = ThreadLocalRandom.current().nextLong(17, 2); + shouldThrow(); } catch (IllegalArgumentException success) { } }