This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-math.git
The following commit(s) were added to refs/heads/master by this push: new 6a4d802cb Show deltas for some failures [skip ci] 6a4d802cb is described below commit 6a4d802cb9cc4e8f4620beb1a6fe4703c9db23b6 Author: Sebb <s...@apache.org> AuthorDate: Sun Dec 24 17:01:00 2023 +0000 Show deltas for some failures [skip ci] --- .../analysis/interpolation/UnivariatePeriodicInterpolatorTest.java | 4 ++-- .../legacy/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolatorTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolatorTest.java index cbadebdfd..32f123ccc 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolatorTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/interpolation/UnivariatePeriodicInterpolatorTest.java @@ -65,7 +65,7 @@ public class UnivariatePeriodicInterpolatorTest { final double y = f.value(x); final double yP = fP.value(x); - Assert.assertEquals("x=" + x, y, yP, Math.ulp(1d)); + Assert.assertEquals("(Delta: ulp(1)) x=" + x, y, yP, Math.ulp(1d)); } // Test interpolation outside the primary interval. @@ -75,7 +75,7 @@ public class UnivariatePeriodicInterpolatorTest { final double yIn = fP.value(xIn); final double yOut = fP.value(xOut); - Assert.assertEquals(yIn, yOut, 1e-7); + Assert.assertEquals("Delta: 1e-7", yIn, yOut, 1e-7); } } diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java index 2d23bf1dc..ca8e1b481 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java @@ -517,9 +517,9 @@ public class CMAESOptimizerTest { new Sigma(inSigma), new PopulationSize(lambda)); - Assert.assertEquals(expected.getValue(), result.getValue(), fTol); + Assert.assertEquals("Delta: " + fTol, expected.getValue(), result.getValue(), fTol); for (int i = 0; i < dim; i++) { - Assert.assertEquals(expected.getPoint()[i], result.getPoint()[i], pointTol); + Assert.assertEquals("Delta: " + pointTol, expected.getPoint()[i], result.getPoint()[i], pointTol); } Assert.assertTrue(optim.getIterations() > 0);