commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1003534 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution: ExponentialDistributionTest.java NormalDistributionTest.java
Date Fri, 01 Oct 2010 13:42:16 GMT
Author: sebb
Date: Fri Oct  1 13:42:15 2010
New Revision: 1003534

URL: http://svn.apache.org/viewvc?rev=1003534&view=rev
Log:
Need to call fail() if we don't generate an Exception
Remove unread variable

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java?rev=1003534&r1=1003533&r2=1003534&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java
Fri Oct  1 13:42:15 2010
@@ -116,7 +116,8 @@ public class ExponentialDistributionTest
 
     public void testPreconditions() {
         try {
-            ExponentialDistribution distribution = new ExponentialDistributionImpl(0);
+            new ExponentialDistributionImpl(0);
+            fail("Should have generated NotStrictlyPositiveException");
         } catch (NotStrictlyPositiveException e) {
             // Expected.
         }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java?rev=1003534&r1=1003533&r2=1003534&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
Fri Oct  1 13:42:15 2010
@@ -128,7 +128,8 @@ public class NormalDistributionTest exte
 
     public void testPreconditions() {
         try {
-            NormalDistribution distribution = new NormalDistributionImpl(1, 0);
+            new NormalDistributionImpl(1, 0);
+            fail("Should have generated NotStrictlyPositiveException");
         } catch (NotStrictlyPositiveException e) {
             // Expected.
         }



Mime
View raw message