mirror of
https://github.com/apache/commons-math.git
synced 2025-02-09 11:35:33 +00:00
Use JUNit assertions not assert in tests
This commit is contained in:
parent
ad9c573012
commit
81f25ca2cc
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user