You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/12/25 15:05:27 UTC
[2/4] [math] Avoid deprecation warnings in tests.
Avoid deprecation warnings in tests.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6b4bf610
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6b4bf610
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6b4bf610
Branch: refs/heads/MATH_3_X
Commit: 6b4bf610b3f2150848ad7a656976bd2d0e240819
Parents: e690ac3
Author: Luc Maisonobe <lu...@apache.org>
Authored: Fri Dec 25 14:57:14 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Fri Dec 25 14:57:14 2015 +0100
----------------------------------------------------------------------
.../BicubicSplineInterpolatingFunctionTest.java | 3 +++
.../BicubicSplineInterpolatorTest.java | 2 ++
.../MicrosphereInterpolatorTest.java | 3 +++
...PolynomialBicubicSplineInterpolatorTest.java | 2 ++
...TricubicSplineInterpolatingFunctionTest.java | 2 ++
.../TricubicSplineInterpolatorTest.java | 2 ++
.../commons/math3/util/ArithmeticUtilsTest.java | 22 ++++++++++++--------
.../commons/math3/util/IncrementorTest.java | 2 ++
8 files changed, 29 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
index 24aa0f4..c01b0fc 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
@@ -30,7 +30,10 @@ import org.junit.Ignore;
/**
* Test case for the bicubic function.
*
+ * @deprecated as of 3.4 replaced by
+ * {@link org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolatingFunction}
*/
+@Deprecated
public final class BicubicSplineInterpolatingFunctionTest {
/**
* Test preconditions.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatorTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatorTest.java
index 3a3852f..df3beb8 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolatorTest.java
@@ -28,7 +28,9 @@ import org.junit.Test;
/**
* Test case for the bicubic interpolator.
*
+ * @deprecated as of 3.4 replaced by {@link org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolator}
*/
+@Deprecated
public final class BicubicSplineInterpolatorTest {
/**
* Test preconditions.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java
index d894d14..90a6faa 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatorTest.java
@@ -24,7 +24,10 @@ import org.junit.Test;
/**
* Test case for the "microsphere projection" interpolator.
*
+ * @deprecated Code will be removed in 4.0. Use {@link InterpolatingMicrosphere}
+ * and {@link MicrosphereProjectionInterpolator} instead.
*/
+@Deprecated
public final class MicrosphereInterpolatorTest {
/**
* Test of interpolator for a plane.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
index 1977b11..35aa2ff 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolatorTest.java
@@ -26,7 +26,9 @@ import org.junit.Test;
/**
* Test case for the smoothing bicubic interpolator.
*
+ * @deprecated To be removed in 4.0 (see MATH-1166).
*/
+@Deprecated
public final class SmoothingPolynomialBicubicSplineInterpolatorTest {
/**
* Test preconditions.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
index c6ee8af..5712087 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
@@ -26,7 +26,9 @@ import org.junit.Test;
/**
* Test case for the bicubic function.
*
+ * @deprecated To be removed in 4.0 (see MATH-1166).
*/
+@Deprecated
public final class TricubicSplineInterpolatingFunctionTest {
/**
* Test preconditions.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatorTest.java b/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatorTest.java
index a747cca..f8468a9 100644
--- a/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math3/analysis/interpolation/TricubicSplineInterpolatorTest.java
@@ -27,7 +27,9 @@ import org.junit.Ignore;
/**
* Test case for the tricubic interpolator.
*
+ * @deprecated To be removed in 4.0 (see MATH-1166).
*/
+@Deprecated
public final class TricubicSplineInterpolatorTest {
/**
* Test preconditions.
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/util/ArithmeticUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/util/ArithmeticUtilsTest.java b/src/test/java/org/apache/commons/math3/util/ArithmeticUtilsTest.java
index ecf0187..37bceda 100644
--- a/src/test/java/org/apache/commons/math3/util/ArithmeticUtilsTest.java
+++ b/src/test/java/org/apache/commons/math3/util/ArithmeticUtilsTest.java
@@ -412,15 +412,6 @@ public class ArithmeticUtilsTest {
// expected behavior
}
- Assert.assertEquals(1801088541l, ArithmeticUtils.pow(21l, 7l));
- Assert.assertEquals(1l, ArithmeticUtils.pow(21l, 0l));
- try {
- ArithmeticUtils.pow(21l, -7l);
- Assert.fail("Expecting MathIllegalArgumentException");
- } catch (MathIllegalArgumentException e) {
- // expected behavior
- }
-
BigInteger twentyOne = BigInteger.valueOf(21l);
Assert.assertEquals(BigInteger.valueOf(1801088541l), ArithmeticUtils.pow(twentyOne, 7));
Assert.assertEquals(BigInteger.ONE, ArithmeticUtils.pow(twentyOne, 0));
@@ -459,6 +450,19 @@ public class ArithmeticUtilsTest {
}
+ @Test
+ @Deprecated
+ public void testPowDeprecated() {
+ Assert.assertEquals(1801088541l, ArithmeticUtils.pow(21l, 7l));
+ Assert.assertEquals(1l, ArithmeticUtils.pow(21l, 0l));
+ try {
+ ArithmeticUtils.pow(21l, -7l);
+ Assert.fail("Expecting MathIllegalArgumentException");
+ } catch (MathIllegalArgumentException e) {
+ // expected behavior
+ }
+ }
+
@Test(expected=MathArithmeticException.class)
public void testPowIntOverflow() {
ArithmeticUtils.pow(21, 8);
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6b4bf610/src/test/java/org/apache/commons/math3/util/IncrementorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/util/IncrementorTest.java b/src/test/java/org/apache/commons/math3/util/IncrementorTest.java
index 382b0fc..8d52f04 100644
--- a/src/test/java/org/apache/commons/math3/util/IncrementorTest.java
+++ b/src/test/java/org/apache/commons/math3/util/IncrementorTest.java
@@ -20,7 +20,9 @@ import org.junit.Test;
/**
* Test for {@link Incrementor}.
+ * @deprecated as of 3.6, Incrementor is deprecated
*/
+@Deprecated
public class IncrementorTest {
@Test
public void testConstructor1() {