commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-numbers] 06/09: Fixed test coverage in LogFactorialTest
Date Sat, 04 Apr 2020 21:16:36 GMT
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 66a3a2d3180bc9ecd0e16ae03aa4a43d1e08279f
Author: Alex Herbert <aherbert@apache.org>
AuthorDate: Sat Apr 4 21:41:19 2020 +0100

    Fixed test coverage in LogFactorialTest
---
 .../apache/commons/numbers/combinatorics/LogFactorialTest.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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 0a4beae..291c557 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
@@ -26,13 +26,21 @@ import org.junit.jupiter.api.Test;
  */
 public class LogFactorialTest {
     @Test
-    public void testNonPositiveArgument() {
+    public void testNonPositiveArgumentWithCache() {
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> LogFactorial.create().withCache(-1)
         );
     }
 
     @Test
+    public void testNonPositiveArgument() {
+        final LogFactorial f = LogFactorial.create();
+        Assertions.assertThrows(IllegalArgumentException.class,
+            () -> f.value(-1)
+        );
+    }
+
+    @Test
     public void testDelegation() {
         final LogFactorial f = LogFactorial.create();
 


Mime
View raw message