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 ef6f62774df1e49cb130d475f45b742d517137b0
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Fri Jul 5 17:37:39 2024 +0100

    Increase edge case test coverage
---
 .../java/org/apache/commons/statistics/descriptive/Int128Test.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/Int128Test.java
 
b/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/Int128Test.java
index e61ed15..a6aab0a 100644
--- 
a/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/Int128Test.java
+++ 
b/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/Int128Test.java
@@ -152,6 +152,11 @@ class Int128Test {
             builder.accept(Arguments.of(rng.nextLong() >>> 1, rng.nextLong(), 
rng.nextLong() >>> 2, rng.nextLong()));
             builder.accept(Arguments.of(rng.nextLong(), rng.nextLong(), 
rng.nextLong(), rng.nextLong()));
         }
+        // Special case where hi is non-zero and lo is zero.
+        // Hit edge case in toDouble()
+        for (int i = 0; i < 5; i++) {
+            builder.accept(Arguments.of(rng.nextLong() >>> 3, 0, 
rng.nextLong() >>> 3, 0));
+        }
         return builder.build();
     }
 

Reply via email to