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 2022/11/09 12:33:59 UTC
[commons-numbers] 04/04: Add Stirling s2 example to the user guide test
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 3aa69eef7c7062d1612dcccbf25c719b061e0efb
Author: aherbert <ah...@apache.org>
AuthorDate: Wed Nov 9 12:33:10 2022 +0000
Add Stirling s2 example to the user guide test
---
.../org/apache/commons/numbers/combinatorics/UserGuideTest.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/UserGuideTest.java b/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/UserGuideTest.java
index 38ef9c6d..5186da00 100644
--- a/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/UserGuideTest.java
+++ b/commons-numbers-combinatorics/src/test/java/org/apache/commons/numbers/combinatorics/UserGuideTest.java
@@ -91,4 +91,11 @@ class UserGuideTest {
"[3, 4, 5]"
), actual);
}
+
+ @Test
+ void testStirlingS2() {
+ Assertions.assertEquals(1, Stirling.stirlingS2(3, 1));
+ Assertions.assertEquals(3, Stirling.stirlingS2(3, 2));
+ Assertions.assertEquals(1, Stirling.stirlingS2(3, 3));
+ }
}