From 3d866e964d95665e71bfec24c5600ce0945695c9 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Thu, 10 Nov 2011 15:54:47 +0000 Subject: [PATCH] Need to fail if the exception is not generated git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1200394 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/math/random/StableRandomGeneratorTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java b/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java index 30d12baa4..faac20d5e 100644 --- a/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java +++ b/src/test/java/org/apache/commons/math/random/StableRandomGeneratorTest.java @@ -96,6 +96,7 @@ public class StableRandomGeneratorTest extends TestCase { try { new StableRandomGenerator(rg, -1.0, 0.0); + fail("Expected OutOfRangeException"); } catch (OutOfRangeException e) { assertEquals(-1.0, e.getArgument()); } @@ -105,6 +106,7 @@ public class StableRandomGeneratorTest extends TestCase { try { new StableRandomGenerator(rg, 3.0, 0.0); + fail("Expected OutOfRangeException"); } catch (OutOfRangeException e) { assertEquals(3.0, e.getArgument()); } @@ -114,6 +116,7 @@ public class StableRandomGeneratorTest extends TestCase { try { new StableRandomGenerator(rg, 1.0, -2.0); + fail("Expected OutOfRangeException"); } catch (OutOfRangeException e) { assertEquals(-2.0, e.getArgument()); } @@ -123,6 +126,7 @@ public class StableRandomGeneratorTest extends TestCase { try { new StableRandomGenerator(rg, 1.0, 2.0); + fail("Expected OutOfRangeException"); } catch (OutOfRangeException e) { assertEquals(2.0, e.getArgument()); }