You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/04/04 21:16:36 UTC
[commons-numbers] 06/09: Fixed test coverage in LogFactorialTest
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 <ah...@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();