Migrate commons-numbers-gamma to JUnit 5: class ErfcTest
*/
package org.apache.commons.numbers.gamma;
-import org.junit.Assert;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
/**
@@ -45,7 +45,7 @@ public class ErfcTest {
double x = -10;
for (int i = 0; i < 41; i++) {
- Assert.assertEquals(gnuValues[i], Erfc.value(x), tol);
+ Assertions.assertEquals(gnuValues[i], Erfc.value(x), tol);
x += 0.5d;
}
}
@@ -78,8 +78,8 @@ public class ErfcTest {
for (int i = 0; i < 15; i++) {
final double result = 0.5 * Erfc.value(ref[i][0] / Math.sqrt(2));
- Assert.assertEquals(ref[i][1], result, 1e-15);
- Assert.assertEquals(1, ref[i][1] / result, 1e-13);
+ Assertions.assertEquals(ref[i][1], result, 1e-15);
+ Assertions.assertEquals(1, ref[i][1] / result, 1e-13);
}
}
}
