commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1379256 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java
Date Fri, 31 Aug 2012 02:13:25 GMT
Author: celestin
Date: Fri Aug 31 02:13:25 2012
New Revision: 1379256

URL: http://svn.apache.org/viewvc?rev=1379256&view=rev
Log:
MATH-849: further tests of double Gamma.logGamma(double).

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java?rev=1379256&r1=1379255&r2=1379256&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/special/GammaTest.java
Fri Aug 31 02:13:25 2012
@@ -322,6 +322,16 @@ public class GammaTest {
         }
     }
 
+    @Test
+    public void testLogGammaPrecondition1() {
+        Assert.assertTrue(Double.isNaN(Gamma.logGamma(0.0)));
+    }
+
+    @Test
+    public void testLogGammaPrecondition2() {
+        Assert.assertTrue(Double.isNaN(Gamma.logGamma(-1.0)));
+    }
+
     /**
      * <p>
      * Reference values for the {@link GammaNSWC#invGamma1pm1(double)} method.



Mime
View raw message