Repository: commons-numbers
Updated Branches:
  refs/heads/master 5a2f9d149 -> 91090df98


NUMBERS-38 (unit test).


Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/91090df9
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/91090df9
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/91090df9

Branch: refs/heads/master
Commit: 91090df9869177582c327c6c7159e981a90efd70
Parents: 5a2f9d1
Author: Gilles Sadowski <gil...@harfang.homelinux.org>
Authored: Wed Jul 5 15:13:14 2017 +0200
Committer: Gilles Sadowski <gil...@harfang.homelinux.org>
Committed: Wed Jul 5 15:13:14 2017 +0200

----------------------------------------------------------------------
 .../commons/numbers/gamma/LanczosApproximationTest.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/91090df9/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/LanczosApproximationTest.java
----------------------------------------------------------------------
diff --git 
a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/LanczosApproximationTest.java
 
b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/LanczosApproximationTest.java
index bd33ee0..e0cb926 100644
--- 
a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/LanczosApproximationTest.java
+++ 
b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/LanczosApproximationTest.java
@@ -27,4 +27,13 @@ public class LanczosApproximationTest {
     public void testG() {
         Assert.assertEquals(607d / 128d, LanczosApproximation.g(), 0d);
     }
+
+    @Test
+    public void testSomeValues() {
+        // Given that few values are checked, this test would only serve
+        // as early warning of unexpected changes to the current code.
+               Assert.assertEquals(29.020294557631818d, 
LanczosApproximation.value(0.1d), 0d);
+               Assert.assertEquals(13.14778027539684d, 
LanczosApproximation.value(1.0d), 0d);
+               Assert.assertEquals(7.897828855157814d, 
LanczosApproximation.value(2.0d), 0d);
+    }
 }

Reply via email to