Redundant unit test removed.

Renamed two methods to be clearer about what is being tested.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/2d868410
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/2d868410
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/2d868410

Branch: refs/heads/master
Commit: 2d868410eead061d59de524bada4de9e3d2bb442
Parents: b3a68ca
Author: Gilles <er...@apache.org>
Authored: Sun Dec 20 22:42:10 2015 +0100
Committer: Gilles <er...@apache.org>
Committed: Sun Dec 20 22:42:10 2015 +0100

----------------------------------------------------------------------
 .../math4/random/RandomGeneratorAbstractTest.java  | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/2d868410/src/test/java/org/apache/commons/math4/random/RandomGeneratorAbstractTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/math4/random/RandomGeneratorAbstractTest.java
 
b/src/test/java/org/apache/commons/math4/random/RandomGeneratorAbstractTest.java
index f9fd26b..26d4dfd 100644
--- 
a/src/test/java/org/apache/commons/math4/random/RandomGeneratorAbstractTest.java
+++ 
b/src/test/java/org/apache/commons/math4/random/RandomGeneratorAbstractTest.java
@@ -162,16 +162,6 @@ public abstract class RandomGeneratorAbstractTest extends 
RandomDataGeneratorTes
         }
     }
 
-    @Test(expected=MathIllegalArgumentException.class)
-    public void testNextIntIAE2() {
-        generator.nextInt(-1);
-    }
-
-    @Test(expected=MathIllegalArgumentException.class)
-    public void testNextIntIAE3() {
-        generator.nextInt(0);
-    }
-
     @Test
     public void testNextLongDirect() {
         long q1 = Long.MAX_VALUE/4;
@@ -283,10 +273,15 @@ public abstract class RandomGeneratorAbstractTest extends 
RandomDataGeneratorTes
     }
 
     @Test(expected=MathIllegalArgumentException.class)
-    public void testNextIntNeg() {
+    public void testNextIntPrecondition1() {
         generator.nextInt(-1);
     }
 
+    @Test(expected=MathIllegalArgumentException.class)
+    public void testNextIntPrecondition2() {
+        generator.nextInt(0);
+    }
+
     @Test
     public void testNextInt2() {
         int walk = 0;

Reply via email to