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/06/23 17:00:55 UTC

[commons-statistics] 28/35: Increase ParetoDistribution test coverage.

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-statistics.git

commit b57d7a37d0e2137c0ff06590cbcfe0f0aab33962
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Jun 23 17:00:45 2020 +0100

    Increase ParetoDistribution test coverage.
---
 .../commons/statistics/distribution/ParetoDistributionTest.java      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
index 0c38841..53217ee 100644
--- a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
@@ -148,6 +148,11 @@ public class ParetoDistributionTest extends ContinuousDistributionAbstractTest {
     }
 
     @Test
+    public void testConstructorPrecondition2() {
+        Assertions.assertThrows(IllegalArgumentException.class, () -> new ParetoDistribution(0, 1));
+    }
+
+    @Test
     public void testDensity() {
         double[] x = new double[] {-2, -1, 0, 1, 2};
         // R 2.14: print(dpareto(c(-2,-1,0,1,2), scale=1, shape=1), digits=10)