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 81f25ca2c Use JUNit assertions not assert in tests
81f25ca2c is described below
commit 81f25ca2cc3b5f6310a2a3d0e6df82366731ee46
Author: Sebb <[email protected]>
AuthorDate: Tue Jul 30 00:08:35 2024 +0100
Use JUNit assertions not assert in tests
---
.../math4/legacy/analysis/integration/SimpsonIntegratorTest.java | 2 +-
.../math4/legacy/stat/regression/GLSMultipleLinearRegressionTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/integration/SimpsonIntegratorTest.java
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/integration/SimpsonIntegratorTest.java
index 1788a5255..e1adb4698 100644
---
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/integration/SimpsonIntegratorTest.java
+++
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/analysis/integration/SimpsonIntegratorTest.java
@@ -200,7 +200,7 @@ public final class SimpsonIntegratorTest {
// sum ~ h/3 * [ f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + 2f(x4) ... +
4f(xn-1) + f(xn) ]
// h = (b-a)/n
// f(xi) = f(a + i*h)
- assert n > 0 && (n & 1) == 0 : "n must be strictly positive and even";
+ Assert.assertTrue( "n must be strictly positive and even, actual: "
+n, n > 0 && (n & 1) == 0);
final double h = (b - a) / n;
double sum4 = 0;
double sum2 = 0;
diff --git
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/regression/GLSMultipleLinearRegressionTest.java
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/regression/GLSMultipleLinearRegressionTest.java
index 722c3ac38..a9f23c343 100644
---
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/regression/GLSMultipleLinearRegressionTest.java
+++
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/regression/GLSMultipleLinearRegressionTest.java
@@ -293,7 +293,7 @@ public class GLSMultipleLinearRegressionTest extends
MultipleLinearRegressionAbs
}
// Verify that GLS is on average more efficient, lower variance
- assert olsBetaStats.getMean() > 1.5 * glsBetaStats.getMean();
- assert olsBetaStats.getStandardDeviation() >
glsBetaStats.getStandardDeviation();
+ Assert.assertTrue(olsBetaStats.getMean() > 1.5 *
glsBetaStats.getMean());
+ Assert.assertTrue(olsBetaStats.getStandardDeviation() >
glsBetaStats.getStandardDeviation());
}
}