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 2807003d6da61ded1d6028030f218708cf8ffbe7
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Wed Oct 27 12:19:47 2021 +0100

    Sonar fix: lambda to contain only one source of an exception
---
 .../src/test/java/org/apache/commons/numbers/gamma/TestUtilsTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/TestUtilsTest.java
 
b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/TestUtilsTest.java
index 6447735..105f533 100644
--- 
a/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/TestUtilsTest.java
+++ 
b/commons-numbers-gamma/src/test/java/org/apache/commons/numbers/gamma/TestUtilsTest.java
@@ -47,7 +47,7 @@ class TestUtilsTest {
         Assertions.assertEquals(2, TestUtils.assertEquals(x - ulp, x + ulp, 
2));
 
         // Opposite signs
-        Assertions.assertThrows(AssertionError.class, () -> 
TestUtils.assertEquals(-x, x, 500000));
+        Assertions.assertThrows(AssertionError.class, () -> 
TestUtils.assertEquals(x, -x, 500000));
     }
 
     @Test
@@ -109,7 +109,7 @@ class TestUtilsTest {
         Assertions.assertEquals(30, TestUtils.assertEquals(bdx, x - 30 * ulp, 
30));
 
         // Opposite signs
-        Assertions.assertThrows(AssertionError.class, () -> 
TestUtils.assertEquals(bdx.negate(), x, 500000));
+        Assertions.assertThrows(AssertionError.class, () -> 
TestUtils.assertEquals(bdx, -x, 500000));
 
         // High precision: Add 1/4 ulp to the value:
         //    ---|----------|----------|-----

Reply via email to