commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1042428 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math: analysis/interpolation/ analysis/polynomials/ linear/ optimization/direct/ optimization/univariate/ transform/
Date Sun, 05 Dec 2010 19:37:55 GMT
Author: sebb
Date: Sun Dec  5 19:37:55 2010
New Revision: 1042428

URL: http://svn.apache.org/viewvc?rev=1042428&view=rev
Log:
Remove unnecessary throws clauses from testxxx methods

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BracketFinderTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunctionTest.java
Sun Dec  5 19:37:55 2010
@@ -264,7 +264,7 @@ public final class BicubicSplineInterpol
      * f(x, y) = &Sigma;<sub>i</sub>&Sigma;<sub>j</sub> (i+1)
(j+2) x<sup>i</sup> y<sup>j</sup>
      */
     @Test
-    public void testSplinePartialDerivatives() throws MathException {
+    public void testSplinePartialDerivatives() {
         final int N = 4;
         final double[] coeff = new double[16];
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/TricubicSplineInterpolatingFunctionTest.java
Sun Dec  5 19:37:55 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.interpolation;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.analysis.TrivariateRealFunction;
@@ -275,7 +274,7 @@ public final class TricubicSplineInterpo
      * </p>
      */
     @Test
-    public void testPlane() throws MathException {
+    public void testPlane() {
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         double[] zval = new double[] {-12, -8, -5.5, -3, 0, 2.5};
@@ -380,7 +379,7 @@ public final class TricubicSplineInterpo
      * with A = 0.2, &omega; = 0.5, k<sub>x</sub> = 2, k<sub>y</sub>
= 1.
      */
     @Test
-    public void testWave() throws MathException {
+    public void testWave() {
         double[] xval = new double[] {3, 4, 5, 6.5};
         double[] yval = new double[] {-4, -3, -1, 2, 2.5};
         double[] zval = new double[] {-12, -8, -5.5, -3, 0, 4};

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeFormTest.java
Sun Dec  5 19:37:55 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import org.apache.commons.math.MathException;
 import junit.framework.TestCase;
 
 /**
@@ -33,7 +32,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the linear function.
      */
-    public void testLinearFunction() throws MathException {
+    public void testLinearFunction() {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 
@@ -62,7 +61,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the quadratic function.
      */
-    public void testQuadraticFunction() throws MathException {
+    public void testQuadraticFunction() {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 
@@ -92,7 +91,7 @@ public final class PolynomialFunctionLag
     /**
      * Test of polynomial for the quintic function.
      */
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         PolynomialFunctionLagrangeForm p;
         double c[], z, expected, result, tolerance = 1E-12;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java
Sun Dec  5 19:37:55 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-import org.apache.commons.math.MathException;
 import junit.framework.TestCase;
 
 /**
@@ -31,7 +30,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the linear function.
      */
-    public void testLinearFunction() throws MathException {
+    public void testLinearFunction() {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 
@@ -60,7 +59,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the quadratic function.
      */
-    public void testQuadraticFunction() throws MathException {
+    public void testQuadraticFunction() {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 
@@ -90,7 +89,7 @@ public final class PolynomialFunctionNew
     /**
      * Test of polynomial for the quintic function.
      */
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         PolynomialFunctionNewtonForm p;
         double coefficients[], z, expected, result, tolerance = 1E-12;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionTest.java
Sun Dec  5 19:37:55 2010
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis.polynomials;
 
-// commons-math
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.util.FastMath;
 // junit
@@ -39,7 +37,7 @@ public final class PolynomialFunctionTes
      *
      * <p>value of this is 2.5 everywhere.</p>
      */
-    public void testConstants() throws MathException {
+    public void testConstants() {
         double[] c = { 2.5 };
         PolynomialFunction f = new PolynomialFunction( c );
 
@@ -65,7 +63,7 @@ public final class PolynomialFunctionTes
      *      f(0.5) = 0.0, f(1.5) = 3.0</tt> and <tt>f(3.0) = 7.5</tt>
      * </p>
      */
-    public void testLinear() throws MathException {
+    public void testLinear() {
         double[] c = { -1.5, 3.0 };
         PolynomialFunction f = new PolynomialFunction( c );
 
@@ -139,7 +137,7 @@ public final class PolynomialFunctionTes
      * <tt>f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6</tt>
      * and <tt>h(x) = 6x - 4</tt>
      */
-    public void testfirstDerivativeComparison() throws MathException {
+    public void testfirstDerivativeComparison() {
         double[] f_coeff = { 3.0, 6.0, -2.0, 1.0 };
         double[] g_coeff = { 6.0, -4.0, 3.0 };
         double[] h_coeff = { -4.0, 6.0 };
@@ -239,7 +237,7 @@ public final class PolynomialFunctionTes
      * <tt>f(x) = x^3 - 2x^2 + 6x + 3, g(x) = 3x^2 - 4x + 6</tt>
      * and <tt>h(x) = 6x - 4</tt>
      */
-    public void testMath341() throws MathException {
+    public void testMath341() {
         double[] f_coeff = { 3.0, 6.0, -2.0, 1.0 };
         double[] g_coeff = { 6.0, -4.0, 3.0 };
         double[] h_coeff = { -4.0, 6.0 };

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskyDecompositionImplTest.java
Sun Dec  5 19:37:55 2010
@@ -20,7 +20,6 @@ package org.apache.commons.math.linear;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.exception.NonSquareMatrixException;
 import org.apache.commons.math.exception.NonPositiveDefiniteMatrixException;
 import org.apache.commons.math.exception.NonSymmetricMatrixException;
@@ -38,7 +37,7 @@ public class CholeskyDecompositionImplTe
 
     /** test dimensions */
     @Test
-    public void testDimensions() throws MathException {
+    public void testDimensions() {
         CholeskyDecomposition llt =
             new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(testData));
         assertEquals(testData.length, llt.getL().getRowDimension());
@@ -49,13 +48,13 @@ public class CholeskyDecompositionImplTe
 
     /** test non-square matrix */
     @Test(expected = NonSquareMatrixException.class)
-    public void testNonSquare() throws MathException {
+    public void testNonSquare() {
         new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(new double[3][2]));
     }
 
     /** test non-symmetric matrix */
     @Test(expected = NonSymmetricMatrixException.class)
-    public void testNotSymmetricMatrixException() throws MathException {
+    public void testNotSymmetricMatrixException() {
         double[][] changed = testData.clone();
         changed[0][changed[0].length - 1] += 1.0e-5;
         new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(changed));
@@ -63,7 +62,7 @@ public class CholeskyDecompositionImplTe
 
     /** test non positive definite matrix */
     @Test(expected = NonPositiveDefiniteMatrixException.class)
-    public void testNotPositiveDefinite() throws MathException {
+    public void testNotPositiveDefinite() {
         new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(new double[][] {
                 { 14, 11, 13, 15, 24 },
                 { 11, 34, 13, 8,  25 },
@@ -74,7 +73,7 @@ public class CholeskyDecompositionImplTe
     }
 
     @Test(expected = NonPositiveDefiniteMatrixException.class)
-    public void testMath274() throws MathException {
+    public void testMath274() {
         new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(new double[][] {
                 { 0.40434286, -0.09376327, 0.30328980, 0.04909388 },
                 {-0.09376327,  0.10400408, 0.07137959, 0.04762857 },
@@ -86,7 +85,7 @@ public class CholeskyDecompositionImplTe
 
     /** test A = LLT */
     @Test
-    public void testAEqualLLT() throws MathException {
+    public void testAEqualLLT() {
         RealMatrix matrix = MatrixUtils.createRealMatrix(testData);
         CholeskyDecomposition llt = new CholeskyDecompositionImpl(matrix);
         RealMatrix l  = llt.getL();
@@ -97,7 +96,7 @@ public class CholeskyDecompositionImplTe
 
     /** test that L is lower triangular */
     @Test
-    public void testLLowerTriangular() throws MathException {
+    public void testLLowerTriangular() {
         RealMatrix matrix = MatrixUtils.createRealMatrix(testData);
         RealMatrix l = new CholeskyDecompositionImpl(matrix).getL();
         for (int i = 0; i < l.getRowDimension(); i++) {
@@ -109,7 +108,7 @@ public class CholeskyDecompositionImplTe
 
     /** test that LT is transpose of L */
     @Test
-    public void testLTTransposed() throws MathException {
+    public void testLTTransposed() {
         RealMatrix matrix = MatrixUtils.createRealMatrix(testData);
         CholeskyDecomposition llt = new CholeskyDecompositionImpl(matrix);
         RealMatrix l  = llt.getL();
@@ -120,7 +119,7 @@ public class CholeskyDecompositionImplTe
 
     /** test matrices values */
     @Test
-    public void testMatricesValues() throws MathException {
+    public void testMatricesValues() {
         RealMatrix lRef = MatrixUtils.createRealMatrix(new double[][] {
                 {  1,  0,  0,  0,  0 },
                 {  2,  3,  0,  0,  0 },

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
Sun Dec  5 19:37:55 2010
@@ -19,8 +19,6 @@ package org.apache.commons.math.linear;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.math.MathException;
-
 public class CholeskySolverTest extends TestCase {
 
     private double[][] testData = new double[][] {
@@ -36,7 +34,7 @@ public class CholeskySolverTest extends 
     }
 
     /** test solve dimension errors */
-    public void testSolveDimensionErrors() throws MathException {
+    public void testSolveDimensionErrors() {
         DecompositionSolver solver =
             new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(testData)).getSolver();
         RealMatrix b = MatrixUtils.createRealMatrix(new double[2][2]);
@@ -61,7 +59,7 @@ public class CholeskySolverTest extends 
     }
 
     /** test solve */
-    public void testSolve() throws MathException {
+    public void testSolve() {
         DecompositionSolver solver =
             new CholeskyDecompositionImpl(MatrixUtils.createRealMatrix(testData)).getSolver();
         RealMatrix b = MatrixUtils.createRealMatrix(new double[][] {
@@ -108,11 +106,11 @@ public class CholeskySolverTest extends 
     }
 
     /** test determinant */
-    public void testDeterminant() throws MathException {
+    public void testDeterminant() {
         assertEquals(7290000.0, getDeterminant(MatrixUtils.createRealMatrix(testData)), 1.0e-15);
     }
 
-    private double getDeterminant(RealMatrix m) throws MathException {
+    private double getDeterminant(RealMatrix m) {
         return new CholeskyDecompositionImpl(m).getDeterminant();
     }
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/PowellOptimizerTest.java
Sun Dec  5 19:37:55 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.optimization.direct;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.MultivariateRealFunction;
 import org.apache.commons.math.analysis.SumSincFunction;
 import org.apache.commons.math.optimization.GoalType;
@@ -31,7 +30,7 @@ import org.junit.Test;
 public class PowellOptimizerTest {
 
     @Test
-    public void testSumSinc() throws MathException {
+    public void testSumSinc() {
         final MultivariateRealFunction func = new SumSincFunction(-1);
 
         int dim = 2;
@@ -56,7 +55,7 @@ public class PowellOptimizerTest {
     }
 
     @Test
-    public void testQuadratic() throws MathException {
+    public void testQuadratic() {
         final MultivariateRealFunction func = new MultivariateRealFunction() {
                 public double value(double[] x) {
                     final double a = x[0] - 1;
@@ -87,7 +86,7 @@ public class PowellOptimizerTest {
     }
 
     @Test
-    public void testMaximizeQuadratic() throws MathException {
+    public void testMaximizeQuadratic() {
         final MultivariateRealFunction func = new MultivariateRealFunction() {
                 public double value(double[] x) {
                     final double a = x[0] - 1;
@@ -131,8 +130,7 @@ public class PowellOptimizerTest {
                         double[] init,
                         GoalType goal,
                         double fTol,
-                        double pointTol)
-        throws MathException {
+                        double pointTol) {
         final MultivariateRealOptimizer optim = new PowellOptimizer(fTol, Math.ulp(1d));
         optim.setMaxEvaluations(1000);
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BracketFinderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BracketFinderTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BracketFinderTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BracketFinderTest.java
Sun Dec  5 19:37:55 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.optimization.univariate;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.optimization.GoalType;
 
@@ -29,7 +28,7 @@ import org.junit.Test;
 public class BracketFinderTest {
 
     @Test
-    public void testCubicMin() throws MathException {
+    public void testCubicMin() {
         final BracketFinder bFind = new BracketFinder();
         final UnivariateRealFunction func = new UnivariateRealFunction() {
                 public double value(double x) {
@@ -51,7 +50,7 @@ public class BracketFinderTest {
     }
 
     @Test
-    public void testCubicMax() throws MathException {
+    public void testCubicMax() {
         final BracketFinder bFind = new BracketFinder();
         final UnivariateRealFunction func = new UnivariateRealFunction() {
                 public double value(double x) {
@@ -72,7 +71,7 @@ public class BracketFinderTest {
     }
 
     @Test
-    public void testMinimumIsOnIntervalBoundary() throws MathException {
+    public void testMinimumIsOnIntervalBoundary() {
         final UnivariateRealFunction func = new UnivariateRealFunction() {
                 public double value(double x) {
                     return x * x;
@@ -91,7 +90,7 @@ public class BracketFinderTest {
     }
 
     @Test
-    public void testIntervalBoundsOrdering() throws MathException {
+    public void testIntervalBoundsOrdering() {
         final UnivariateRealFunction func = new UnivariateRealFunction() {
                 public double value(double x) {
                     return x * x;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
Sun Dec  5 19:37:55 2010
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
@@ -35,7 +34,7 @@ import org.junit.Test;
 public final class BrentOptimizerTest {
 
     @Test
-    public void testSinMin() throws MathException {
+    public void testSinMin() {
         UnivariateRealFunction f = new SinFunction();
         UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
         optimizer.setMaxEvaluations(200);
@@ -55,7 +54,7 @@ public final class BrentOptimizerTest {
     }
 
     @Test
-    public void testQuinticMin() throws MathException {
+    public void testQuinticMin() {
         // The function has local minima at -0.27195613 and 0.82221643.
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-10, 1e-14);
@@ -70,7 +69,7 @@ public final class BrentOptimizerTest {
     }
 
     @Test
-    public void testQuinticMinStatistics() throws MathException {
+    public void testQuinticMinStatistics() {
         // The function has local minima at -0.27195613 and 0.82221643.
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealOptimizer optimizer = new BrentOptimizer(1e-11, 1e-14);
@@ -99,7 +98,7 @@ public final class BrentOptimizerTest {
     }
 
     @Test(expected = TooManyEvaluationsException.class)
-    public void testQuinticMax() throws MathException {
+    public void testQuinticMax() {
         // The quintic function has zeros at 0, +-0.5 and +-1.
         // The function has a local maximum at 0.27195613.
         UnivariateRealFunction f = new QuinticFunction();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
Sun Dec  5 19:37:55 2010
@@ -18,7 +18,6 @@ package org.apache.commons.math.transfor
 
 import org.apache.commons.math.analysis.*;
 import org.apache.commons.math.util.FastMath;
-import org.apache.commons.math.MathException;
 import junit.framework.TestCase;
 
 /**
@@ -69,7 +68,7 @@ public final class FastCosineTransformer
     /**
      * Test of transformer for the sine function.
      */
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         FastCosineTransformer transformer = new FastCosineTransformer();
         double min, max, result[], tolerance = 1E-12; int N = 9;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
Sun Dec  5 19:37:55 2010
@@ -19,7 +19,6 @@ package org.apache.commons.math.transfor
 import org.apache.commons.math.analysis.*;
 import org.apache.commons.math.complex.*;
 import org.apache.commons.math.util.FastMath;
-import org.apache.commons.math.MathException;
 import junit.framework.TestCase;
 
 /**
@@ -114,7 +113,7 @@ public final class FastFourierTransforme
     /**
      * Test of transformer for the sine function.
      */
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         FastFourierTransformer transformer = new FastFourierTransformer();
         Complex result[]; int N = 1 << 8;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java?rev=1042428&r1=1042427&r2=1042428&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java
Sun Dec  5 19:37:55 2010
@@ -18,7 +18,6 @@ package org.apache.commons.math.transfor
 
 import org.apache.commons.math.analysis.*;
 import org.apache.commons.math.util.FastMath;
-import org.apache.commons.math.MathException;
 import junit.framework.TestCase;
 
 /**
@@ -69,7 +68,7 @@ public final class FastSineTransformerTe
     /**
      * Test of transformer for the sine function.
      */
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         FastSineTransformer transformer = new FastSineTransformer();
         double min, max, result[], tolerance = 1E-12; int N = 1 << 8;



Mime
View raw message