Skip to content

Commit

Permalink
Show deltas for some failures [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Dec 24, 2023
1 parent a114d5a commit 6a4d802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void testSine() {
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.
Expand All @@ -75,7 +75,7 @@ public void testSine() {
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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ private void doTest(MultivariateFunction func,
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);
Expand Down

0 comments on commit 6a4d802

Please sign in to comment.