This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 7983d34b7b3fab4dbaf21c04dad427555b498539
Author: aherbert <aherb...@apache.org>
AuthorDate: Mon Jun 29 15:44:36 2020 +0100

    Add assertions to test of useless cache
---
 .../commons/numbers/combinatorics/LogFactorialTest.java     | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 
a/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/LogFactorialTest.java
 
b/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/LogFactorialTest.java
index 568335d..e7c84ce 100644
--- 
a/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/LogFactorialTest.java
+++ 
b/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/LogFactorialTest.java
@@ -84,15 +84,20 @@ public class LogFactorialTest {
     void testZeroCache() {
         // Ensure that no exception is thrown.
         final LogFactorial f = LogFactorial.create().withCache(0);
-        Assertions.assertEquals(0, f.value(0), 0d);
-        Assertions.assertEquals(0, f.value(1), 0d);
+        Assertions.assertEquals(0, f.value(0));
+        Assertions.assertEquals(0, f.value(1));
     }
 
     @Test
     void testUselessCache() {
         // Ensure that no exception is thrown.
-        LogFactorial.create().withCache(1);
-        LogFactorial.create().withCache(2);
+        LogFactorial f = LogFactorial.create().withCache(1);
+        Assertions.assertEquals(0, f.value(0));
+        Assertions.assertEquals(0, f.value(1));
+
+        f = LogFactorial.create().withCache(2);
+        Assertions.assertEquals(0, f.value(0));
+        Assertions.assertEquals(0, f.value(1));
     }
 
     @Test

Reply via email to