commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1003907 - in /commons/proper/math/branches/MATH_2_X: ./ src/test/java/org/apache/commons/math/analysis/solvers/ src/test/java/org/apache/commons/math/estimation/ src/test/java/org/apache/commons/math/fraction/ src/test/java/org/apache/comm...
Date Sat, 02 Oct 2010 22:23:35 GMT
Author: luc
Date: Sat Oct  2 22:23:34 2010
New Revision: 1003907

URL: http://svn.apache.org/viewvc?rev=1003907&view=rev
Log:
backported r1003567 from trunk to branch 2.X
Don't catch Exception and fail(); let JUnit handle it

Modified:
    commons/proper/math/branches/MATH_2_X/   (props changed)
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/BigFractionTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/FractionTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/RotationTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/Vector3DTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayFieldVectorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/EigenSolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUDecompositionImplTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUSolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/QRSolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/TriDiagonalTransformerTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/NelderMeadTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/RandomDataTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/ValueServerTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java

Propchange: commons/proper/math/branches/MATH_2_X/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct  2 22:23:34 2010
@@ -1 +1 @@
-/commons/proper/math/trunk:1003346,1003348-1003351,1003526,1003533,1003543,1003545,1003547,1003549,1003566,1003569,1003584
+/commons/proper/math/trunk:1003346,1003348-1003351,1003526,1003533,1003543,1003545,1003547,1003549,1003566-1003567,1003569,1003584

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java Sat Oct  2 22:23:34 2010
@@ -363,8 +363,6 @@ public final class BrentSolverTest exten
           fail("an IllegalArgumentException was expected");
         } catch (IllegalArgumentException iae) {
             // expected behaviour
-        } catch (Exception e) {
-            fail("wrong exception caught: " + e.getMessage());
         }
 
         // bad guess

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java Sat Oct  2 22:23:34 2010
@@ -263,8 +263,6 @@ public class GaussNewtonEstimatorTest
       fail("an exception should have been caught");
     } catch (EstimationException ee) {
       // expected behavior
-    } catch (Exception e) {
-      fail("wrong exception type caught");
     }
   }
 
@@ -348,8 +346,6 @@ public class GaussNewtonEstimatorTest
         fail("an exception should have been caught");
     } catch (EstimationException ee) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception type caught");
     }
 
   }
@@ -387,8 +383,6 @@ public class GaussNewtonEstimatorTest
         fail("an exception should have been caught");
     } catch (EstimationException ee) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception type caught");
     }
 
   }
@@ -495,8 +489,6 @@ public class GaussNewtonEstimatorTest
         fail("an exception should have been caught");
       } catch (EstimationException ee) {
         // expected behavior
-      } catch (Exception e) {
-        fail("wrong exception type caught");
       }
     }
 
@@ -558,8 +550,6 @@ public class GaussNewtonEstimatorTest
         fail("an exception should have been caught");
     } catch (EstimationException ee) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception type caught");
     }
 }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java Sat Oct  2 22:23:34 2010
@@ -110,8 +110,6 @@ public class LevenbergMarquardtEstimator
         fail("an exception should have been thrown");
     } catch (EstimationException ee) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception caught");
     }
     assertEquals(1.5,
                  problem.getUnboundParameters()[0].getEstimate(),
@@ -275,8 +273,6 @@ public class LevenbergMarquardtEstimator
         fail("an exception should have been thrown");
     } catch (EstimationException ee) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception caught");
     }
    double dJ0 = 2 * (m[0].getResidual() * m[0].getPartial(p[0])
                     + m[1].getResidual() * m[1].getPartial(p[0])
@@ -486,8 +482,6 @@ public class LevenbergMarquardtEstimator
         assertTrue(! shouldFail);
       } catch (EstimationException ee) {
         assertTrue(shouldFail);
-      } catch (Exception e) {
-        fail("wrong exception type caught");
       }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/BigFractionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/BigFractionTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/BigFractionTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/BigFractionTest.java Sat Oct  2 22:23:34 2010
@@ -98,8 +98,6 @@ public class BigFractionTest extends Tes
             fail("an exception should have been thrown");
         } catch (ConvergenceException ce) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/FractionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/FractionTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/FractionTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/fraction/FractionTest.java Sat Oct  2 22:23:34 2010
@@ -73,8 +73,6 @@ public class FractionTest extends TestCa
             fail("an exception should have been thrown");
         } catch (ConvergenceException ce) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -146,8 +144,6 @@ public class FractionTest extends TestCa
             fail("an exception should have been thrown");
         } catch (ConvergenceException ce) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/RotationTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/RotationTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/RotationTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/RotationTest.java Sat Oct  2 22:23:34 2010
@@ -70,8 +70,6 @@ public class RotationTest
       new Rotation(new Vector3D(0, 0, 0), 2 * FastMath.PI / 3);
       fail("an exception should have been thrown");
     } catch (ArithmeticException e) {
-    } catch (Exception e) {
-      fail("unexpected exception");
     }
 
     r = new Rotation(Vector3D.PLUS_K, 1.5 * FastMath.PI);
@@ -107,10 +105,8 @@ public class RotationTest
     try {
         new Rotation(u, Vector3D.ZERO);
         fail("an exception should have been thrown");
-      } catch (IllegalArgumentException e) {
+    } catch (IllegalArgumentException e) {
         // expected behavior
-      } catch (Exception e) {
-        fail("unexpected exception");
     }
 
   }
@@ -150,8 +146,6 @@ public class RotationTest
         fail("an exception should have been thrown");
     } catch (IllegalArgumentException e) {
       // expected behavior
-    } catch (Exception e) {
-        fail("unexpected exception");
     }
 
   }
@@ -167,8 +161,6 @@ public class RotationTest
       fail("Expecting NotARotationMatrixException");
     } catch (NotARotationMatrixException nrme) {
       // expected behavior
-    } catch (Exception e) {
-      fail("wrong exception caught: " + e.getMessage());
     }
 
     try {
@@ -180,8 +172,6 @@ public class RotationTest
       fail("Expecting NotARotationMatrixException");
     } catch (NotARotationMatrixException nrme) {
       // expected behavior
-    } catch (Exception e) {
-      fail("wrong exception caught: " + e.getMessage());
     }
 
     try {
@@ -193,8 +183,6 @@ public class RotationTest
         fail("Expecting NotARotationMatrixException");
       } catch (NotARotationMatrixException nrme) {
         // expected behavior
-      } catch (Exception e) {
-        fail("wrong exception caught: " + e.getMessage());
       }
 
     checkRotation(new Rotation(new double[][] {
@@ -303,8 +291,6 @@ public class RotationTest
       fail("got " + r + ", should have caught an exception");
     } catch (NotARotationMatrixException e) {
       // expected
-    } catch (Exception e) {
-      fail("wrong exception caught");
     }
 
   }
@@ -369,8 +355,6 @@ public class RotationTest
           fail("an exception should have been caught");
         } catch (CardanEulerSingularityException cese) {
           // expected behavior
-        } catch (Exception e) {
-          fail("wrong exception caught: " + e.getMessage());
         }
       }
     }
@@ -389,8 +373,6 @@ public class RotationTest
           fail("an exception should have been caught");
         } catch (CardanEulerSingularityException cese) {
           // expected behavior
-        } catch (Exception e) {
-          fail("wrong exception caught: " + e.getMessage());
         }
       }
     }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/Vector3DTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/Vector3DTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/Vector3DTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/geometry/Vector3DTest.java Sat Oct  2 22:23:34 2010
@@ -181,8 +181,6 @@ public class Vector3DTest
         fail("an exception should have been thrown");
     } catch (ArithmeticException ae) {
         // expected behavior
-    } catch (Exception e) {
-        fail("wrong exception caught: " + e.getMessage());
     }
   }
 
@@ -198,8 +196,6 @@ public class Vector3DTest
           fail("an exception should have been thrown");
       } catch (ArithmeticException ae) {
           // expected behavior
-      } catch (Exception e) {
-          fail("wrong exception caught: " + e.getMessage());
       }
   }
 
@@ -218,8 +214,6 @@ public class Vector3DTest
          fail("an exception should have been thrown");
      } catch (ArithmeticException ae) {
          // expected behavior
-     } catch (Exception e) {
-         fail("wrong exception caught: " + e.getMessage());
      }
   }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayFieldVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayFieldVectorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayFieldVectorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayFieldVectorTest.java Sat Oct  2 22:23:34 2010
@@ -277,8 +277,6 @@ public class ArrayFieldVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         FieldVector<Fraction> v5_i = new ArrayFieldVector<Fraction>(dvec1);
@@ -297,8 +295,6 @@ public class ArrayFieldVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayFieldVector<Fraction> v7 = new ArrayFieldVector<Fraction>(v1);
@@ -372,8 +368,6 @@ public class ArrayFieldVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayFieldVector<Fraction> v_set1 = (ArrayFieldVector<Fraction>) v1.copy();
@@ -384,8 +378,6 @@ public class ArrayFieldVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayFieldVector<Fraction> v_set2 = (ArrayFieldVector<Fraction>) v4.copy();
@@ -397,8 +389,6 @@ public class ArrayFieldVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayFieldVector<Fraction> v_set3 = (ArrayFieldVector<Fraction>) v1.copy();
@@ -410,8 +400,6 @@ public class ArrayFieldVectorTest extend
             fail("ArrayIndexOutOfBoundsException expected");
         } catch (ArrayIndexOutOfBoundsException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayFieldVector<Fraction> v_set4 = (ArrayFieldVector<Fraction>) v4.copy();
@@ -423,8 +411,6 @@ public class ArrayFieldVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
 
@@ -581,8 +567,6 @@ public class ArrayFieldVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
        try {
@@ -590,8 +574,6 @@ public class ArrayFieldVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         try {
@@ -599,8 +581,6 @@ public class ArrayFieldVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
     }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java Sat Oct  2 22:23:34 2010
@@ -538,8 +538,6 @@ public class ArrayRealVectorTest extends
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         RealVector v5_i = new ArrayRealVector(dvec1);
@@ -558,8 +556,6 @@ public class ArrayRealVectorTest extends
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v7 = new ArrayRealVector(v1);
@@ -616,8 +612,6 @@ public class ArrayRealVectorTest extends
             fail("expected exception");
         } catch (NullPointerException npe) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         try {
@@ -625,8 +619,6 @@ public class ArrayRealVectorTest extends
             fail("expected exception");
         } catch (IllegalArgumentException iae) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
    }
@@ -680,8 +672,6 @@ public class ArrayRealVectorTest extends
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_set1 = (ArrayRealVector) v1.copy();
@@ -692,8 +682,6 @@ public class ArrayRealVectorTest extends
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_set2 = (ArrayRealVector) v4.copy();
@@ -705,8 +693,6 @@ public class ArrayRealVectorTest extends
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_set3 = (ArrayRealVector) v1.copy();
@@ -718,8 +704,6 @@ public class ArrayRealVectorTest extends
             fail("ArrayIndexOutOfBoundsException expected");
         } catch (ArrayIndexOutOfBoundsException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_set4 = (ArrayRealVector) v4.copy();
@@ -731,8 +715,6 @@ public class ArrayRealVectorTest extends
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
 
@@ -1196,8 +1178,6 @@ public class ArrayRealVectorTest extends
             fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_unitize = (ArrayRealVector)v1.copy();
@@ -1208,8 +1188,6 @@ public class ArrayRealVectorTest extends
             fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         ArrayRealVector v_projection = v1.projection(v2);
@@ -1243,8 +1221,6 @@ public class ArrayRealVectorTest extends
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
        try {
@@ -1252,8 +1228,6 @@ public class ArrayRealVectorTest extends
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         try {
@@ -1261,8 +1235,6 @@ public class ArrayRealVectorTest extends
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
     }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/CholeskySolverTest.java Sat Oct  2 22:23:34 2010
@@ -45,24 +45,18 @@ public class CholeskySolverTest extends 
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(new ArrayRealVectorTest.RealVectorTestImpl(b.getColumn(0)));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/EigenSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/EigenSolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/EigenSolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/EigenSolverTest.java Sat Oct  2 22:23:34 2010
@@ -44,8 +44,6 @@ public class EigenSolverTest extends Tes
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -71,24 +69,18 @@ public class EigenSolverTest extends Tes
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             es.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             es.solve(new ArrayRealVectorTest.RealVectorTestImpl(b.getColumn(0)));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java Sat Oct  2 22:23:34 2010
@@ -79,8 +79,6 @@ public class FieldLUDecompositionImplTes
             }));
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUDecompositionImplTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUDecompositionImplTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUDecompositionImplTest.java Sat Oct  2 22:23:34 2010
@@ -76,8 +76,6 @@ public class LUDecompositionImplTest ext
             fail("Expecting InvalidMatrixException");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUSolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUSolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/LUSolverTest.java Sat Oct  2 22:23:34 2010
@@ -79,24 +79,18 @@ public class LUSolverTest extends TestCa
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(new ArrayRealVectorTest.RealVectorTestImpl(b.getColumn(0)));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -110,32 +104,24 @@ public class LUSolverTest extends TestCa
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumnVector(0));
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(new ArrayRealVectorTest.RealVectorTestImpl(b.getColumn(0)));
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/QRSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/QRSolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/QRSolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/QRSolverTest.java Sat Oct  2 22:23:34 2010
@@ -78,24 +78,18 @@ public class QRSolverTest extends TestCa
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumnVector(0));
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -109,24 +103,18 @@ public class QRSolverTest extends TestCa
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumnVector(0));
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException iae) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java Sat Oct  2 22:23:34 2010
@@ -336,8 +336,6 @@ public abstract class RealVectorFormatAb
             fail("Expecting ParseException");
         } catch (ParseException pe) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java Sat Oct  2 22:23:34 2010
@@ -40,24 +40,18 @@ public class SingularValueSolverTest {
             Assert.fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            Assert.fail("wrong exception caught");
         }
         try {
             solver.solve(b.getColumn(0));
             Assert.fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            Assert.fail("wrong exception caught");
         }
         try {
             solver.solve(new ArrayRealVectorTest.RealVectorTestImpl(b.getColumn(0)));
             Assert.fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected behavior
-        } catch (Exception e) {
-            Assert.fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java Sat Oct  2 22:23:34 2010
@@ -178,8 +178,6 @@ public class SparseFieldVectorTest exten
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java Sat Oct  2 22:23:34 2010
@@ -582,8 +582,6 @@ public class SparseRealVectorTest extend
         //    fail("IllegalArgumentException expected");
         //} catch (IllegalArgumentException ex) {
             // expected behavior
-        //} catch (Exception e) {
-        //    fail("wrong exception caught");
         //}
 
         RealVector v5_i = new OpenMapRealVector(dvec1);
@@ -641,8 +639,6 @@ public class SparseRealVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         OpenMapRealVector v_set1 = v1.copy();
@@ -653,8 +649,6 @@ public class SparseRealVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         OpenMapRealVector v_set2 = v4.copy();
@@ -666,8 +660,6 @@ public class SparseRealVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         OpenMapRealVector v_set3 = v1.copy();
@@ -679,8 +671,6 @@ public class SparseRealVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         OpenMapRealVector v_set4 = v4.copy();
@@ -692,8 +682,6 @@ public class SparseRealVectorTest extend
             fail("MatrixIndexException expected");
         } catch (MatrixIndexException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
 
@@ -1129,8 +1117,6 @@ public class SparseRealVectorTest extend
             fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         OpenMapRealVector v_unitize = v1.copy();
@@ -1141,8 +1127,6 @@ public class SparseRealVectorTest extend
             fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         RealVector v_projection = v1.projection(v2);
@@ -1165,8 +1149,6 @@ public class SparseRealVectorTest extend
             fail("IllegalArgumentException expected");
         } catch (IllegalArgumentException ex) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/TriDiagonalTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/TriDiagonalTransformerTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/TriDiagonalTransformerTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/linear/TriDiagonalTransformerTest.java Sat Oct  2 22:23:34 2010
@@ -49,8 +49,6 @@ public class TriDiagonalTransformerTest 
             fail("an exception should have been thrown");
         } catch (InvalidMatrixException ime) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java Sat Oct  2 22:23:34 2010
@@ -43,8 +43,7 @@ public class HighamHall54IntegratorTest
     super(name);
   }
 
-  public void testWrongDerivative() {
-    try {
+  public void testWrongDerivative() throws Exception {
       HighamHall54Integrator integrator =
           new HighamHall54Integrator(0.0, 1.0, 1.0e-10, 1.0e-10);
       FirstOrderDifferentialEquations equations =
@@ -77,9 +76,6 @@ public class HighamHall54IntegratorTest
         // expected behavior
       }
 
-    } catch (Exception e) {
-      fail("wrong exception caught: " + e.getMessage());
-    }
   }
 
   public void testMinStep() {
@@ -197,7 +193,7 @@ public class HighamHall54IntegratorTest
 
   }
 
-  public void testEventsErrors() {
+  public void testEventsErrors() throws Exception {
 
       final TestProblem1 pb = new TestProblem1();
       double minStep = 0;
@@ -235,13 +231,11 @@ public class HighamHall54IntegratorTest
         fail("an exception should have been thrown");
       } catch (IntegratorException ie) {
         // expected behavior
-      } catch (Exception e) {
-        fail("wrong exception type caught");
       }
 
   }
 
-  public void testEventsNoConvergence() {
+  public void testEventsNoConvergence() throws Exception {
 
     final TestProblem1 pb = new TestProblem1();
     double minStep = 0;
@@ -277,14 +271,11 @@ public class HighamHall54IntegratorTest
     } catch (IntegratorException ie) {
        assertTrue(ie.getCause() != null);
        assertTrue(ie.getCause() instanceof ConvergenceException);
-    } catch (Exception e) {
-      fail("wrong exception type caught");
     }
 
 }
 
-  public void testSanityChecks() {
-    try {
+  public void testSanityChecks() throws Exception {
       final TestProblem3 pb  = new TestProblem3(0.9);
       double minStep = 0;
       double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -339,9 +330,6 @@ public class HighamHall54IntegratorTest
         // expected behavior
       }
 
-    } catch (Exception e) {
-      fail("wrong exception caught: " + e.getMessage());
-    }
   }
 
   public void testKepler()

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java Sat Oct  2 22:23:34 2010
@@ -122,8 +122,6 @@ public class DummyStepInterpolatorTest {
     } catch (IOException ioe) {
         // expected behavior
         assertEquals(0, ioe.getMessage().length());
-    } catch (Exception e) {
-        fail("wrong exception caught");
     }
 
   }

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/MultiDirectionalTest.java Sat Oct  2 22:23:34 2010
@@ -31,7 +31,7 @@ import org.junit.Test;
 public class MultiDirectionalTest {
 
   @Test
-  public void testFunctionEvaluationExceptions() {
+  public void testFunctionEvaluationExceptions() throws OptimizationException {
       MultivariateRealFunction wrong =
           new MultivariateRealFunction() {
             private static final long serialVersionUID = 4751314470965489371L;
@@ -52,8 +52,6 @@ public class MultiDirectionalTest {
       } catch (FunctionEvaluationException ce) {
           // expected behavior
           Assert.assertNull(ce.getCause());
-      } catch (Exception e) {
-          Assert.fail("wrong exception caught: " + e.getMessage());
       }
       try {
           MultiDirectional optimizer = new MultiDirectional(0.9, 1.9);
@@ -62,8 +60,6 @@ public class MultiDirectionalTest {
       } catch (FunctionEvaluationException ce) {
           // expected behavior
           Assert.assertNotNull(ce.getCause());
-      } catch (Exception e) {
-          Assert.fail("wrong exception caught: " + e.getMessage());
       }
   }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/NelderMeadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/NelderMeadTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/NelderMeadTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/direct/NelderMeadTest.java Sat Oct  2 22:23:34 2010
@@ -44,7 +44,7 @@ import org.junit.Test;
 public class NelderMeadTest {
 
   @Test
-  public void testFunctionEvaluationExceptions() {
+  public void testFunctionEvaluationExceptions() throws OptimizationException {
       MultivariateRealFunction wrong =
           new MultivariateRealFunction() {
             private static final long serialVersionUID = 4751314470965489371L;
@@ -65,8 +65,6 @@ public class NelderMeadTest {
       } catch (FunctionEvaluationException ce) {
           // expected behavior
           assertNull(ce.getCause());
-      } catch (Exception e) {
-          fail("wrong exception caught: " + e.getMessage());
       }
       try {
           NelderMead optimizer = new NelderMead(0.9, 1.9, 0.4, 0.6);
@@ -75,8 +73,6 @@ public class NelderMeadTest {
       } catch (FunctionEvaluationException ce) {
           // expected behavior
           assertNotNull(ce.getCause());
-      } catch (Exception e) {
-          fail("wrong exception caught: " + e.getMessage());
       }
   }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java Sat Oct  2 22:23:34 2010
@@ -204,7 +204,7 @@ extends TestCase {
 
     }
 
-    public void testNonInversible() {
+    public void testNonInversible() throws Exception {
 
         LinearProblem problem = new LinearProblem(new double[][] {
                 {  1, 2, -3 },
@@ -219,8 +219,6 @@ extends TestCase {
             fail("an exception should have been caught");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
     }
 
@@ -260,7 +258,7 @@ extends TestCase {
 
     }
 
-    public void testMoreEstimatedParametersSimple() {
+    public void testMoreEstimatedParametersSimple() throws Exception {
 
         LinearProblem problem = new LinearProblem(new double[][] {
                 { 3.0, 2.0,  0.0, 0.0 },
@@ -277,13 +275,11 @@ extends TestCase {
             fail("an exception should have been caught");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
 
     }
 
-    public void testMoreEstimatedParametersUnsorted() {
+    public void testMoreEstimatedParametersUnsorted() throws Exception {
         LinearProblem problem = new LinearProblem(new double[][] {
                  { 1.0, 1.0,  0.0,  0.0, 0.0,  0.0 },
                  { 0.0, 0.0,  1.0,  1.0, 1.0,  0.0 },
@@ -300,8 +296,6 @@ extends TestCase {
             fail("an exception should have been caught");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
     }
 
@@ -359,8 +353,6 @@ extends TestCase {
             fail("an exception should have been thrown");
         } catch (OptimizationException oe) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         try {
@@ -370,13 +362,11 @@ extends TestCase {
             fail("an exception should have been thrown");
         } catch (FunctionEvaluationException oe) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
     }
 
-    public void testMaxIterations() {
+    public void testMaxEvaluations() throws Exception {
         Circle circle = new Circle();
         circle.addPoint( 30.0,  68.0);
         circle.addPoint( 50.0,  -6.0);
@@ -393,8 +383,6 @@ extends TestCase {
             fail("an exception should have been caught");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
     }
 
@@ -467,8 +455,6 @@ extends TestCase {
             fail("an exception should have been caught");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
 
         VectorialPointValuePair optimum =

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java Sat Oct  2 22:23:34 2010
@@ -116,8 +116,6 @@ public class LevenbergMarquardtOptimizer
             fail("an exception should have been thrown");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         assertEquals(1.5, optimum.getPoint()[0], 1.0e-10);
         assertEquals(3.0, optimum.getValue()[0], 1.0e-10);
@@ -218,8 +216,6 @@ public class LevenbergMarquardtOptimizer
             fail("an exception should have been thrown");
         } catch (OptimizationException ee) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
     }
@@ -342,8 +338,6 @@ public class LevenbergMarquardtOptimizer
             fail("an exception should have been thrown");
         } catch (OptimizationException oe) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
         try {
@@ -353,8 +347,6 @@ public class LevenbergMarquardtOptimizer
             fail("an exception should have been thrown");
         } catch (FunctionEvaluationException oe) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
 
     }
@@ -391,8 +383,6 @@ public class LevenbergMarquardtOptimizer
             assertTrue(shouldFail);
         } catch (FunctionEvaluationException ee) {
             assertTrue(shouldFail);
-        } catch (Exception e) {
-            fail("wrong exception type caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java Sat Oct  2 22:23:34 2010
@@ -49,8 +49,6 @@ public final class BrentOptimizerTest {
             fail("an exception should have been thrown");
         } catch (NoDataException ise) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
         assertEquals(3 * FastMath.PI / 2, minimizer.optimize(f, GoalType.MINIMIZE, 4, 5), 10 * minimizer.getRelativeAccuracy());
         assertTrue(minimizer.getIterationCount() <= 50);
@@ -128,8 +126,6 @@ public final class BrentOptimizerTest {
             fail("an exception should have been thrown");
         } catch (MaxIterationsExceededException miee) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java Sat Oct  2 22:23:34 2010
@@ -135,8 +135,6 @@ public final class EmpiricalDistribution
             fail("Expecting IllegalStateException");
         } catch (IllegalStateException ex) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -188,8 +186,6 @@ public final class EmpiricalDistribution
             fail("load((double[]) null) expected NullPointerException");
         } catch (NullPointerException e) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -200,8 +196,6 @@ public final class EmpiricalDistribution
             fail("load((URL) null) expected NullPointerException");
         } catch (NullPointerException e) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
@@ -212,8 +206,6 @@ public final class EmpiricalDistribution
             fail("load((File) null) expected NullPointerException");
         } catch (NullPointerException e) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/RandomDataTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/RandomDataTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/RandomDataTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/RandomDataTest.java Sat Oct  2 22:23:34 2010
@@ -209,11 +209,7 @@ public class RandomDataTest extends Retr
         }
         Frequency f = new Frequency();
         for (int i = 0; i < largeSampleSize; i++) {
-            try {
-                f.addValue(randomData.nextPoisson(4.0d));
-            } catch (Exception ex) {
-                fail(ex.getMessage());
-            }
+            f.addValue(randomData.nextPoisson(4.0d));
         }
         long cumFreq = f.getCount(0) + f.getCount(1) + f.getCount(2)
                 + f.getCount(3) + f.getCount(4) + f.getCount(5);

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/ValueServerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/ValueServerTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/ValueServerTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/random/ValueServerTest.java Sat Oct  2 22:23:34 2010
@@ -39,12 +39,8 @@ public final class ValueServerTest exten
     @Override
     public void setUp() {
         vs.setMode(ValueServer.DIGEST_MODE);
-        try {
-            URL url = getClass().getResource("testData.txt");
-            vs.setValuesFileURL(url);
-        } catch (Exception ex) {
-            fail("malformed test URL");
-        }
+        URL url = getClass().getResource("testData.txt");
+        vs.setValuesFileURL(url);
     }
 
     /**
@@ -92,7 +88,7 @@ public final class ValueServerTest exten
         } catch (IllegalStateException ex) {}
     }
 
-    public void testEmptyReplayFile() {
+    public void testEmptyReplayFile() throws Exception {
         try {
             URL url = getClass().getResource("emptyFile.txt");
             vs.setMode(ValueServer.REPLAY_MODE);
@@ -101,12 +97,10 @@ public final class ValueServerTest exten
             fail("an exception should have been thrown");
         } catch (EOFException eof) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 
-    public void testEmptyDigestFile() {
+    public void testEmptyDigestFile() throws Exception {
         try {
             URL url = getClass().getResource("emptyFile.txt");
             vs.setMode(ValueServer.DIGEST_MODE);
@@ -115,8 +109,6 @@ public final class ValueServerTest exten
             fail("an exception should have been thrown");
         } catch (EOFException eof) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/DescriptiveStatisticsTest.java Sat Oct  2 22:23:34 2010
@@ -72,8 +72,6 @@ public class DescriptiveStatisticsTest e
             fail("an exception should have been thrown");
         } catch (IllegalArgumentException iae) {
             // expected
-        } catch (Exception e) {
-            fail("wrong exception caught: " + e.getMessage());
         }
         assertEquals(300, stats.getWindowSize());
         stats.setWindowSize(50);

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java Sat Oct  2 22:23:34 2010
@@ -176,8 +176,6 @@ public class MultivariateSummaryStatisti
             fail("Expecting DimensionMismatchException");
         } catch (DimensionMismatchException dme) {
             // expected behavior
-        } catch (Exception e) {
-            fail("wrong exception caught");
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovarianceTest.java Sat Oct  2 22:23:34 2010
@@ -38,8 +38,6 @@ extends TestCase {
         } catch (DimensionMismatchException dme) {
             assertEquals(5, dme.getDimension1());
             assertEquals(8, dme.getDimension2());
-        } catch (Exception e) {
-            fail("wrong exception type caught: " + e.getClass().getName());
         }
     }
 

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java?rev=1003907&r1=1003906&r2=1003907&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/descriptive/moment/VectorialMeanTest.java Sat Oct  2 22:23:34 2010
@@ -37,8 +37,6 @@ extends TestCase {
         } catch (DimensionMismatchException dme) {
             assertEquals(5, dme.getDimension1());
             assertEquals(8, dme.getDimension2());
-        } catch (Exception e) {
-            fail("wrong exception type caught: " + e.getClass().getName());
         }
     }
 



Mime
View raw message