commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1364028 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math3: distribution/ random/
Date Sat, 21 Jul 2012 00:42:50 GMT
Author: erans
Date: Sat Jul 21 00:42:49 2012
New Revision: 1364028

URL: http://svn.apache.org/viewvc?rev=1364028&view=rev
Log:
MATH-829
Removed unnecessary (and uninformative) "throws Exception" clauses in
method signature.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/CauchyDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ChiSquaredDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ExponentialDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/FDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GammaDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/IntegerDistributionAbstractTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/KolmogorovSmirnovDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/LogNormalDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/NormalDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PascalDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PoissonDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TriangularDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/UniformRealDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/WeibullDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomDataTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomGeneratorAbstractTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -29,7 +29,7 @@ public class AbstractIntegerDistribution
     protected final double p = diceDistribution.probability(1);
 
     @Test
-    public void testCumulativeProbabilitiesSingleArguments() throws Exception {
+    public void testCumulativeProbabilitiesSingleArguments() {
         for (int i = 1; i < 7; i++) {
             Assert.assertEquals(p * i,
                     diceDistribution.cumulativeProbability(i), Double.MIN_VALUE);
@@ -41,7 +41,7 @@ public class AbstractIntegerDistribution
     }
 
     @Test
-    public void testCumulativeProbabilitiesRangeArguments() throws Exception {
+    public void testCumulativeProbabilitiesRangeArguments() {
         int lower = 0;
         int upper = 6;
         for (int i = 0; i < 2; i++) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -80,7 +80,7 @@ public class BinomialDistributionTest ex
 
     /** Test degenerate case p = 0 */
     @Test
-    public void testDegenerate0() throws Exception {
+    public void testDegenerate0() {
         BinomialDistribution dist = new BinomialDistribution(5, 0.0d);
         setDistribution(dist);
         setCumulativeTestPoints(new int[] { -1, 0, 1, 5, 10 });
@@ -98,7 +98,7 @@ public class BinomialDistributionTest ex
 
     /** Test degenerate case p = 1 */
     @Test
-    public void testDegenerate1() throws Exception {
+    public void testDegenerate1() {
         BinomialDistribution dist = new BinomialDistribution(5, 1.0d);
         setDistribution(dist);
         setCumulativeTestPoints(new int[] { -1, 0, 1, 2, 5, 10 });

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/CauchyDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/CauchyDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/CauchyDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/CauchyDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -33,7 +33,7 @@ public class CauchyDistributionTest exte
     // --------------------- Override tolerance  --------------
     protected double defaultTolerance = NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY;
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(defaultTolerance);
     }
@@ -71,7 +71,7 @@ public class CauchyDistributionTest exte
     //---------------------------- Additional test cases -------------------------
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0.0, 1.0});
         setInverseCumulativeTestValues(
                 new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ChiSquaredDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ChiSquaredDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ChiSquaredDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ChiSquaredDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -74,7 +74,7 @@ public class ChiSquaredDistributionTest 
 
  // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1e-9);
     }
@@ -82,7 +82,7 @@ public class ChiSquaredDistributionTest 
  //---------------------------- Additional test cases -------------------------
 
     @Test
-    public void testSmallDf() throws Exception {
+    public void testSmallDf() {
         setDistribution(new ChiSquaredDistribution(0.1d));
         setTolerance(1E-4);
         // quantiles computed using R version 1.8.1 (linux version)

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ExponentialDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ExponentialDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ExponentialDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/ExponentialDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -33,7 +33,7 @@ public class ExponentialDistributionTest
 
     // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1E-9);
     }
@@ -71,21 +71,21 @@ public class ExponentialDistributionTest
     //------------ Additional tests -------------------------------------------
 
     @Test
-    public void testCumulativeProbabilityExtremes() throws Exception {
+    public void testCumulativeProbabilityExtremes() {
         setCumulativeTestPoints(new double[] {-2, 0});
         setCumulativeTestValues(new double[] {0, 0});
         verifyCumulativeProbabilities();
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
          setInverseCumulativeTestPoints(new double[] {0, 1});
          setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
          verifyInverseCumulativeProbabilities();
     }
 
     @Test
-    public void testCumulativeProbability2() throws Exception {
+    public void testCumulativeProbability2() {
         double actual = getDistribution().cumulativeProbability(0.25, 0.75);
         Assert.assertEquals(0.0905214, actual, 10e-4);
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/FDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/FDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/FDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/FDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -60,7 +60,7 @@ public class FDistributionTest extends R
 
     // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1e-9);
     }
@@ -68,14 +68,14 @@ public class FDistributionTest extends R
     //---------------------------- Additional test cases -------------------------
 
     @Test
-    public void testCumulativeProbabilityExtremes() throws Exception {
+    public void testCumulativeProbabilityExtremes() {
         setCumulativeTestPoints(new double[] {-2, 0});
         setCumulativeTestValues(new double[] {0, 0});
         verifyCumulativeProbabilities();
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0, 1});
         setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
         verifyInverseCumulativeProbabilities();
@@ -105,7 +105,7 @@ public class FDistributionTest extends R
     }
 
     @Test
-    public void testLargeDegreesOfFreedom() throws Exception {
+    public void testLargeDegreesOfFreedom() {
         FDistribution fd = new FDistribution(100000, 100000);
         double p = fd.cumulativeProbability(.999);
         double x = fd.inverseCumulativeProbability(p);
@@ -113,7 +113,7 @@ public class FDistributionTest extends R
     }
 
     @Test
-    public void testSmallDegreesOfFreedom() throws Exception {
+    public void testSmallDegreesOfFreedom() {
         FDistribution fd = new FDistribution(1, 1);
         double p = fd.cumulativeProbability(0.975);
         double x = fd.inverseCumulativeProbability(p);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GammaDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GammaDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GammaDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GammaDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -69,7 +69,7 @@ public class GammaDistributionTest exten
 
     // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1e-9);
     }
@@ -99,7 +99,7 @@ public class GammaDistributionTest exten
     }
 
     @Test
-    public void testProbabilities() throws Exception {
+    public void testProbabilities() {
         testProbability(-1.000, 4.0, 2.0, .0000);
         testProbability(15.501, 4.0, 2.0, .9499);
         testProbability(0.504, 4.0, 1.0, .0018);
@@ -108,20 +108,20 @@ public class GammaDistributionTest exten
     }
 
     @Test
-    public void testValues() throws Exception {
+    public void testValues() {
         testValue(15.501, 4.0, 2.0, .9499);
         testValue(0.504, 4.0, 1.0, .0018);
         testValue(10.011, 1.0, 2.0, .9933);
         testValue(5.000, 2.0, 2.0, .7127);
     }
 
-    private void testProbability(double x, double a, double b, double expected) throws Exception {
+    private void testProbability(double x, double a, double b, double expected) {
         GammaDistribution distribution = new GammaDistribution( a, b );
         double actual = distribution.cumulativeProbability(x);
         Assert.assertEquals("probability for " + x, expected, actual, 10e-4);
     }
 
-    private void testValue(double expected, double a, double b, double p) throws Exception {
+    private void testValue(double expected, double a, double b, double p) {
         GammaDistribution distribution = new GammaDistribution( a, b );
         double actual = distribution.inverseCumulativeProbability(p);
         Assert.assertEquals("critical value for " + p, expected, actual, 10e-4);
@@ -156,7 +156,7 @@ public class GammaDistributionTest exten
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0, 1});
         setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
         verifyInverseCumulativeProbabilities();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/HypergeometricDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -85,7 +85,7 @@ public class HypergeometricDistributionT
 
     /** Verify that if there are no failures, mass is concentrated on sampleSize */
     @Test
-    public void testDegenerateNoFailures() throws Exception {
+    public void testDegenerateNoFailures() {
         HypergeometricDistribution dist = new HypergeometricDistribution(5,5,3);
         setDistribution(dist);
         setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
@@ -103,7 +103,7 @@ public class HypergeometricDistributionT
 
     /** Verify that if there are no successes, mass is concentrated on 0 */
     @Test
-    public void testDegenerateNoSuccesses() throws Exception {
+    public void testDegenerateNoSuccesses() {
         HypergeometricDistribution dist = new HypergeometricDistribution(5,0,3);
         setDistribution(dist);
         setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
@@ -121,7 +121,7 @@ public class HypergeometricDistributionT
 
     /** Verify that if sampleSize = populationSize, mass is concentrated on numberOfSuccesses */
     @Test
-    public void testDegenerateFullSample() throws Exception {
+    public void testDegenerateFullSample() {
         HypergeometricDistribution dist = new HypergeometricDistribution(5,3,5);
         setDistribution(dist);
         setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/IntegerDistributionAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/IntegerDistributionAbstractTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/IntegerDistributionAbstractTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/IntegerDistributionAbstractTest.java Sat Jul 21 00:42:49 2012
@@ -131,7 +131,7 @@ public abstract class IntegerDistributio
      * Verifies that probability density calculations match expected values
      * using current test instance data
      */
-    protected void verifyDensities() throws Exception {
+    protected void verifyDensities() {
         for (int i = 0; i < densityTestPoints.length; i++) {
             Assert.assertEquals("Incorrect density value returned for " + densityTestPoints[i],
                     densityTestValues[i],
@@ -143,7 +143,7 @@ public abstract class IntegerDistributio
      * Verifies that cumulative probability density calculations match expected values
      * using current test instance data
      */
-    protected void verifyCumulativeProbabilities() throws Exception {
+    protected void verifyCumulativeProbabilities() {
         for (int i = 0; i < cumulativeTestPoints.length; i++) {
             Assert.assertEquals("Incorrect cumulative probability value returned for " + cumulativeTestPoints[i],
                     cumulativeTestValues[i],
@@ -156,7 +156,7 @@ public abstract class IntegerDistributio
      * Verifies that inverse cumulative probability density calculations match expected values
      * using current test instance data
      */
-    protected void verifyInverseCumulativeProbabilities() throws Exception {
+    protected void verifyInverseCumulativeProbabilities() {
         for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
             Assert.assertEquals("Incorrect inverse cumulative probability value returned for "
                     + inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
@@ -171,7 +171,7 @@ public abstract class IntegerDistributio
      * using default test instance data
      */
     @Test
-    public void testDensities() throws Exception {
+    public void testDensities() {
         verifyDensities();
     }
 
@@ -180,7 +180,7 @@ public abstract class IntegerDistributio
      * using default test instance data
      */
     @Test
-    public void testCumulativeProbabilities() throws Exception {
+    public void testCumulativeProbabilities() {
         verifyCumulativeProbabilities();
     }
 
@@ -189,7 +189,7 @@ public abstract class IntegerDistributio
      * using default test instance data
      */
     @Test
-    public void testInverseCumulativeProbabilities() throws Exception {
+    public void testInverseCumulativeProbabilities() {
         verifyInverseCumulativeProbabilities();
     }
 
@@ -215,7 +215,7 @@ public abstract class IntegerDistributio
      * Verifies that illegal arguments are correctly handled
      */
     @Test
-    public void testIllegalArguments() throws Exception {
+    public void testIllegalArguments() {
         try {
             distribution.cumulativeProbability(1, 0);
             Assert.fail("Expecting MathIllegalArgumentException for bad cumulativeProbability interval");
@@ -240,7 +240,7 @@ public abstract class IntegerDistributio
      * Test sampling
      */
     @Test
-    public void testSampling() throws Exception {
+    public void testSampling() {
         int[] densityPoints = makeDensityTestPoints();
         double[] densityValues = makeDensityTestValues();
         int sampleSize = 1000;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/KolmogorovSmirnovDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/KolmogorovSmirnovDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/KolmogorovSmirnovDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/KolmogorovSmirnovDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -30,7 +30,7 @@ public class KolmogorovSmirnovDistributi
     private static final double TOLERANCE = 10e-10;
 
     @Test
-    public void testCumulativeDensityFunction() throws Exception {
+    public void testCumulativeDensityFunction() {
         
         KolmogorovSmirnovDistribution dist;
         

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/LogNormalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/LogNormalDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/LogNormalDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/LogNormalDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -100,14 +100,14 @@ public class LogNormalDistributionTest e
 
     // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(LogNormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
     }
 
     //---------------------------- Additional test cases -------------------------
 
-    private void verifyQuantiles() throws Exception {
+    private void verifyQuantiles() {
         LogNormalDistribution distribution = (LogNormalDistribution)getDistribution();
         double mu = distribution.getScale();
         double sigma = distribution.getShape();
@@ -119,7 +119,7 @@ public class LogNormalDistributionTest e
     }
 
     @Test
-    public void testQuantiles() throws Exception {
+    public void testQuantiles() {
         setCumulativeTestValues(new double[] {0, 0.0396495152787,
                                               0.16601209243, 0.272533253269,
                                               0.357618409638, 0.426488363093,
@@ -156,7 +156,7 @@ public class LogNormalDistributionTest e
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0, 1});
         setInverseCumulativeTestValues(
                 new double[] {0, Double.POSITIVE_INFINITY});
@@ -206,7 +206,7 @@ public class LogNormalDistributionTest e
      * Verifies fixes for JIRA MATH-167, MATH-414
      */
     @Test
-    public void testExtremeValues() throws Exception {
+    public void testExtremeValues() {
         LogNormalDistribution d = new LogNormalDistribution(0, 1);
         for (int i = 0; i < 1e5; i++) { // make sure no convergence exception
             double upperTail = d.cumulativeProbability(i);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/NormalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/NormalDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/NormalDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/NormalDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -63,14 +63,14 @@ public class NormalDistributionTest exte
     // --------------------- Override tolerance  --------------
     protected double defaultTolerance = NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY;
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(defaultTolerance);
     }
 
     //---------------------------- Additional test cases -------------------------
 
-    private void verifyQuantiles() throws Exception {
+    private void verifyQuantiles() {
         NormalDistribution distribution = (NormalDistribution) getDistribution();
         double mu = distribution.getMean();
         double sigma = distribution.getStandardDeviation();
@@ -84,7 +84,7 @@ public class NormalDistributionTest exte
     }
 
     @Test
-    public void testQuantiles() throws Exception {
+    public void testQuantiles() {
         setDensityTestValues(new double[] {0.0385649760808, 0.172836231799, 0.284958771715, 0.172836231799, 0.0385649760808,
                 0.00316560600853, 9.55930184035e-05, 1.06194251052e-06});
         verifyQuantiles();
@@ -104,7 +104,7 @@ public class NormalDistributionTest exte
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0, 1});
         setInverseCumulativeTestValues(
                 new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});
@@ -149,7 +149,7 @@ public class NormalDistributionTest exte
      * Verifies fixes for JIRA MATH-167, MATH-414
      */
     @Test
-    public void testExtremeValues() throws Exception {
+    public void testExtremeValues() {
         NormalDistribution distribution = new NormalDistribution(0, 1);
         for (int i = 0; i < 100; i++) { // make sure no convergence exception
             double lowerTail = distribution.cumulativeProbability(-i);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PascalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PascalDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PascalDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PascalDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -89,7 +89,7 @@ public class PascalDistributionTest exte
 
     /** Test degenerate case p = 0   */
     @Test
-    public void testDegenerate0() throws Exception {
+    public void testDegenerate0() {
         setDistribution(new PascalDistribution(5, 0.0d));
         setCumulativeTestPoints(new int[] {-1, 0, 1, 5, 10 });
         setCumulativeTestValues(new double[] {0d, 0d, 0d, 0d, 0d});
@@ -104,7 +104,7 @@ public class PascalDistributionTest exte
 
     /** Test degenerate case p = 1   */
     @Test
-    public void testDegenerate1() throws Exception {
+    public void testDegenerate1() {
         setDistribution(new PascalDistribution(5, 1.0d));
         setCumulativeTestPoints(new int[] {-1, 0, 1, 2, 5, 10 });
         setCumulativeTestValues(new double[] {0d, 1d, 1d, 1d, 1d, 1d});

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PoissonDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PoissonDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PoissonDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/PoissonDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -112,7 +112,7 @@ public class PoissonDistributionTest ext
      * P(9900 &le; X &le; 10200) for X  = Po(10000)
      */
     @Test
-    public void testNormalApproximateProbability() throws Exception {
+    public void testNormalApproximateProbability() {
         PoissonDistribution dist = new PoissonDistribution(100);
         double result = dist.normalApproximateProbability(110)
                 - dist.normalApproximateProbability(89);
@@ -129,7 +129,7 @@ public class PoissonDistributionTest ext
      * @throws Exception
      */
     @Test
-    public void testDegenerateInverseCumulativeProbability() throws Exception {
+    public void testDegenerateInverseCumulativeProbability() {
         PoissonDistribution dist = new PoissonDistribution(DEFAULT_TEST_POISSON_PARAMETER);
         Assert.assertEquals(Integer.MAX_VALUE, dist.inverseCumulativeProbability(1.0d));
         Assert.assertEquals(0, dist.inverseCumulativeProbability(0d));
@@ -179,7 +179,7 @@ public class PoissonDistributionTest ext
      * JIRA: MATH-282
      */
     @Test
-    public void testCumulativeProbabilitySpecial() throws Exception {
+    public void testCumulativeProbabilitySpecial() {
         PoissonDistribution dist;
         dist = new PoissonDistribution(9120);
         checkProbability(dist, 9075);
@@ -190,7 +190,7 @@ public class PoissonDistributionTest ext
         checkProbability(dist, 6950);
     }
 
-    private void checkProbability(PoissonDistribution dist, int x) throws Exception {
+    private void checkProbability(PoissonDistribution dist, int x) {
         double p = dist.cumulativeProbability(x);
         Assert.assertFalse("NaN cumulative probability returned for mean = " +
                 dist.getMean() + " x = " + x, Double.isNaN(p));
@@ -199,7 +199,7 @@ public class PoissonDistributionTest ext
     }
 
     @Test
-    public void testLargeMeanInverseCumulativeProbability() throws Exception {
+    public void testLargeMeanInverseCumulativeProbability() {
         double mean = 1.0;
         while (mean <= 100000.0) { // Extended test value: 1E7.  Reduced to limit run time.
             PoissonDistribution dist = new PoissonDistribution(mean);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java Sat Jul 21 00:42:49 2012
@@ -116,7 +116,7 @@ public abstract class RealDistributionAb
      * Setup sets all test instance data to default values
      */
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         distribution = makeDistribution();
         cumulativeTestPoints = makeCumulativeTestPoints();
         cumulativeTestValues = makeCumulativeTestValues();
@@ -129,7 +129,7 @@ public abstract class RealDistributionAb
      * Cleans up test instance data
      */
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         distribution = null;
         cumulativeTestPoints = null;
         cumulativeTestValues = null;
@@ -144,7 +144,7 @@ public abstract class RealDistributionAb
      * Verifies that cumulative probability density calculations match expected values
      * using current test instance data
      */
-    protected void verifyCumulativeProbabilities() throws Exception {
+    protected void verifyCumulativeProbabilities() {
         // verify cumulativeProbability(double)
         for (int i = 0; i < cumulativeTestPoints.length; i++) {
             TestUtils.assertEquals("Incorrect cumulative probability value returned for "
@@ -175,7 +175,7 @@ public abstract class RealDistributionAb
      * Verifies that inverse cumulative probability density calculations match expected values
      * using current test instance data
      */
-    protected void verifyInverseCumulativeProbabilities() throws Exception {
+    protected void verifyInverseCumulativeProbabilities() {
         for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
             TestUtils.assertEquals("Incorrect inverse cumulative probability value returned for "
                 + inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
@@ -187,7 +187,7 @@ public abstract class RealDistributionAb
     /**
      * Verifies that density calculations match expected values
      */
-    protected void verifyDensities() throws Exception {
+    protected void verifyDensities() {
         for (int i = 0; i < cumulativeTestPoints.length; i++) {
             TestUtils.assertEquals("Incorrect probability density value returned for "
                 + cumulativeTestPoints[i], densityTestValues[i],
@@ -203,7 +203,7 @@ public abstract class RealDistributionAb
      * using default test instance data
      */
     @Test
-    public void testCumulativeProbabilities() throws Exception {
+    public void testCumulativeProbabilities() {
         verifyCumulativeProbabilities();
     }
 
@@ -212,7 +212,7 @@ public abstract class RealDistributionAb
      * using default test instance data
      */
     @Test
-    public void testInverseCumulativeProbabilities() throws Exception {
+    public void testInverseCumulativeProbabilities() {
         verifyInverseCumulativeProbabilities();
     }
 
@@ -221,7 +221,7 @@ public abstract class RealDistributionAb
      * for default test instance data
      */
     @Test
-    public void testDensities() throws Exception {
+    public void testDensities() {
         verifyDensities();
     }
 
@@ -229,7 +229,7 @@ public abstract class RealDistributionAb
      * Verifies that probability computations are consistent
      */
     @Test
-    public void testConsistency() throws Exception {
+    public void testConsistency() {
         for (int i=1; i < cumulativeTestPoints.length; i++) {
 
             // check that cdf(x, x) = 0
@@ -252,7 +252,7 @@ public abstract class RealDistributionAb
      * Verifies that illegal arguments are correctly handled
      */
     @Test
-    public void testIllegalArguments() throws Exception {
+    public void testIllegalArguments() {
         try {
             distribution.cumulativeProbability(1, 0);
             Assert.fail("Expecting MathIllegalArgumentException for bad cumulativeProbability interval");
@@ -277,7 +277,7 @@ public abstract class RealDistributionAb
      * Test sampling
      */
     @Test
-    public void testSampling() throws Exception {
+    public void testSampling() {
         final int sampleSize = 1000;
         distribution.reseedRandomGenerator(1000); // Use fixed seed
         double[] sample = distribution.sample(sampleSize);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -61,7 +61,7 @@ public class TDistributionTest extends R
 
     // --------------------- Override tolerance  --------------
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1E-9);
     }
@@ -72,14 +72,14 @@ public class TDistributionTest extends R
      *      Bug report that prompted this unit test.</a>
      */
     @Test
-    public void testCumulativeProbabilityAgainstStackOverflow() throws Exception {
+    public void testCumulativeProbabilityAgainstStackOverflow() {
         TDistribution td = new TDistribution(5.);
         td.cumulativeProbability(.1);
         td.cumulativeProbability(.01);
     }
 
     @Test
-    public void testSmallDf() throws Exception {
+    public void testSmallDf() {
         setDistribution(new TDistribution(1d));
         // quantiles computed using R version 2.9.2
         setCumulativeTestPoints(new double[] {-318.308838986, -31.8205159538, -12.7062047362,
@@ -95,7 +95,7 @@ public class TDistributionTest extends R
     }
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0, 1});
         setInverseCumulativeTestValues(
                 new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TriangularDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TriangularDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TriangularDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/TriangularDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -31,7 +31,7 @@ public class TriangularDistributionTest 
     // --- Override tolerance -------------------------------------------------
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1e-4);
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/UniformRealDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/UniformRealDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/UniformRealDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/UniformRealDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -30,7 +30,7 @@ public class UniformRealDistributionTest
     // --- Override tolerance -------------------------------------------------
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
         super.setUp();
         setTolerance(1e-4);
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/WeibullDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/WeibullDistributionTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/WeibullDistributionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/WeibullDistributionTest.java Sat Jul 21 00:42:49 2012
@@ -64,7 +64,7 @@ public class WeibullDistributionTest ext
     //---------------------------- Additional test cases -------------------------
 
     @Test
-    public void testInverseCumulativeProbabilityExtremes() throws Exception {
+    public void testInverseCumulativeProbabilityExtremes() {
         setInverseCumulativeTestPoints(new double[] {0.0, 1.0});
         setInverseCumulativeTestValues(
                 new double[] {0.0, Double.POSITIVE_INFINITY});

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomDataTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomDataTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomDataTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomDataTest.java Sat Jul 21 00:42:49 2012
@@ -98,7 +98,7 @@ public class RandomDataTest {
     }
     
     @Test
-    public void testNextIntIAE() throws Exception {
+    public void testNextIntIAE() {
         try {
             randomData.nextInt(4, 3);
             Assert.fail("MathIllegalArgumentException expected");
@@ -108,7 +108,7 @@ public class RandomDataTest {
     }
     
     @Test
-    public void testNextIntNegativeToPositiveRange() throws Exception {
+    public void testNextIntNegativeToPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextIntUniform(-3, 5);
             checkNextIntUniform(-3, 6);
@@ -116,7 +116,7 @@ public class RandomDataTest {
     }
     
     @Test 
-    public void testNextIntNegativeRange() throws Exception {
+    public void testNextIntNegativeRange() {
         for (int i = 0; i < 5; i++) {
             checkNextIntUniform(-7, -4);
             checkNextIntUniform(-15, -2);
@@ -124,7 +124,7 @@ public class RandomDataTest {
     }
     
     @Test 
-    public void testNextIntPositiveRange() throws Exception {
+    public void testNextIntPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextIntUniform(0, 3);
             checkNextIntUniform(2, 12);
@@ -133,7 +133,7 @@ public class RandomDataTest {
     }
     
     
-    private void checkNextIntUniform(int min, int max) throws Exception {
+    private void checkNextIntUniform(int min, int max) {
         final Frequency freq = new Frequency();
         for (int i = 0; i < smallSampleSize; i++) {
             final int value = randomData.nextInt(min, max);
@@ -164,7 +164,7 @@ public class RandomDataTest {
     }
     
     @Test
-    public void testNextLongNegativeToPositiveRange() throws Exception {
+    public void testNextLongNegativeToPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextLongUniform(-3, 5);
             checkNextLongUniform(-3, 6);
@@ -172,7 +172,7 @@ public class RandomDataTest {
     }
     
     @Test 
-    public void testNextLongNegativeRange() throws Exception {
+    public void testNextLongNegativeRange() {
         for (int i = 0; i < 5; i++) {
             checkNextLongUniform(-7, -4);
             checkNextLongUniform(-15, -2);
@@ -180,14 +180,14 @@ public class RandomDataTest {
     }
     
     @Test 
-    public void testNextLongPositiveRange() throws Exception {
+    public void testNextLongPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextLongUniform(0, 3);
             checkNextLongUniform(2, 12);
         }
     }
     
-    private void checkNextLongUniform(int min, int max) throws Exception {
+    private void checkNextLongUniform(int min, int max) {
         final Frequency freq = new Frequency();
         for (int i = 0; i < smallSampleSize; i++) {
             final long value = randomData.nextLong(min, max);
@@ -219,7 +219,7 @@ public class RandomDataTest {
     
     @Test
     @Retry(3)
-    public void testNextSecureLongNegativeToPositiveRange() throws Exception {
+    public void testNextSecureLongNegativeToPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureLongUniform(-3, 5);
             checkNextSecureLongUniform(-3, 6);
@@ -228,7 +228,7 @@ public class RandomDataTest {
     
     @Test
     @Retry(3)
-    public void testNextSecureLongNegativeRange() throws Exception {
+    public void testNextSecureLongNegativeRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureLongUniform(-7, -4);
             checkNextSecureLongUniform(-15, -2);
@@ -237,14 +237,14 @@ public class RandomDataTest {
     
     @Test
     @Retry(3)
-    public void testNextSecureLongPositiveRange() throws Exception {
+    public void testNextSecureLongPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureLongUniform(0, 3);
             checkNextSecureLongUniform(2, 12);
         }
     }
     
-    private void checkNextSecureLongUniform(int min, int max) throws Exception {
+    private void checkNextSecureLongUniform(int min, int max) {
         final Frequency freq = new Frequency();
         for (int i = 0; i < smallSampleSize; i++) {
             final long value = randomData.nextSecureLong(min, max);
@@ -276,7 +276,7 @@ public class RandomDataTest {
     
     @Test
     @Retry(3)
-    public void testNextSecureIntNegativeToPositiveRange() throws Exception {
+    public void testNextSecureIntNegativeToPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureIntUniform(-3, 5);
             checkNextSecureIntUniform(-3, 6);
@@ -285,7 +285,7 @@ public class RandomDataTest {
     
     @Test
     @Retry(3)
-    public void testNextSecureIntNegativeRange() throws Exception {
+    public void testNextSecureIntNegativeRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureIntUniform(-7, -4);
             checkNextSecureIntUniform(-15, -2);
@@ -294,14 +294,14 @@ public class RandomDataTest {
     
     @Test 
     @Retry(3)
-    public void testNextSecureIntPositiveRange() throws Exception {
+    public void testNextSecureIntPositiveRange() {
         for (int i = 0; i < 5; i++) {
             checkNextSecureIntUniform(0, 3);
             checkNextSecureIntUniform(2, 12);
         }
     }
      
-    private void checkNextSecureIntUniform(int min, int max) throws Exception {
+    private void checkNextSecureIntUniform(int min, int max) {
         final Frequency freq = new Frequency();
         for (int i = 0; i < smallSampleSize; i++) {
             final int value = randomData.nextSecureInt(min, max);
@@ -363,7 +363,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextPoissonConsistency() throws Exception {
+    public void testNextPoissonConsistency() {
 
         // Small integral means
         for (int i = 1; i < 100; i++) {
@@ -389,7 +389,7 @@ public class RandomDataTest {
      * distributions are the same. If the null hypothesis can be rejected with confidence
      * 1 - alpha, the check fails.
      */
-    public void checkNextPoissonConsistency(double mean) throws Exception {
+    public void checkNextPoissonConsistency(double mean) {
         // Generate sample values
         final int sampleSize = 1000;        // Number of deviates to generate
         final int minExpectedCount = 7;     // Minimum size of expected bin count
@@ -511,7 +511,7 @@ public class RandomDataTest {
 
     /** test dispersion and failure modes for nextHex() */
     @Test
-    public void testNextHex() throws Exception {
+    public void testNextHex() {
         try {
             randomData.nextHexString(-1);
             Assert.fail("negative length supplied -- MathIllegalArgumentException expected");
@@ -560,7 +560,7 @@ public class RandomDataTest {
     /** test dispersion and failure modes for nextHex() */
     @Test
     @Retry(3)
-    public void testNextSecureHex() throws Exception {
+    public void testNextSecureHex() {
         try {
             randomData.nextSecureHexString(-1);
             Assert.fail("negative length -- MathIllegalArgumentException expected");
@@ -641,34 +641,34 @@ public class RandomDataTest {
     }
     
     @Test
-    public void testNextUniformUniformPositiveBounds() throws Exception {
+    public void testNextUniformUniformPositiveBounds() {
         for (int i = 0; i < 5; i++) {
             checkNextUniformUniform(0, 10);
         }
     }
     
     @Test
-    public void testNextUniformUniformNegativeToPositiveBounds() throws Exception {
+    public void testNextUniformUniformNegativeToPositiveBounds() {
         for (int i = 0; i < 5; i++) {
             checkNextUniformUniform(-3, 5);
         }
     }
     
     @Test
-    public void testNextUniformUniformNegaiveBounds() throws Exception {
+    public void testNextUniformUniformNegaiveBounds() {
         for (int i = 0; i < 5; i++) {
             checkNextUniformUniform(-7, -3);
         }
     }
     
     @Test
-    public void testNextUniformUniformMaximalInterval() throws Exception {
+    public void testNextUniformUniformMaximalInterval() {
         for (int i = 0; i < 5; i++) {
             checkNextUniformUniform(-Double.MAX_VALUE, Double.MAX_VALUE);
         }
     }
     
-    private void checkNextUniformUniform(double min, double max) throws Exception {
+    private void checkNextUniformUniform(double min, double max) {
         // Set up bin bounds - min, binBound[0], ..., binBound[binCount-2], max
         final int binCount = 5;
         final double binSize = max / binCount - min/binCount; // Prevent overflow in extreme value case
@@ -736,7 +736,7 @@ public class RandomDataTest {
 
     /** test failure modes and distribution of nextExponential() */
     @Test
-    public void testNextExponential() throws Exception {
+    public void testNextExponential() {
         try {
             randomData.nextExponential(-1);
             Assert.fail("negative mean -- expecting MathIllegalArgumentException");
@@ -921,7 +921,7 @@ public class RandomDataTest {
 
     /** tests for nextPermutation */
     @Test
-    public void testNextPermutation() throws Exception {
+    public void testNextPermutation() {
         int[][] p = { { 0, 1, 2 }, { 0, 2, 1 }, { 1, 0, 2 }, { 1, 2, 0 },
                 { 2, 0, 1 }, { 2, 1, 0 } };
         long[] observed = { 0, 0, 0, 0, 0, 0 };
@@ -990,7 +990,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextInversionDeviate() throws Exception {
+    public void testNextInversionDeviate() {
         // Set the seed for the default random generator
         randomData.reSeed(100);
         double[] quantiles = new double[10];
@@ -1012,7 +1012,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextBeta() throws Exception {
+    public void testNextBeta() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new BetaDistribution(2,5));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1024,7 +1024,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextCauchy() throws Exception {
+    public void testNextCauchy() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new CauchyDistribution(1.2, 2.1));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1036,7 +1036,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextChiSquare() throws Exception {
+    public void testNextChiSquare() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new ChiSquaredDistribution(12));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1048,7 +1048,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextF() throws Exception {
+    public void testNextF() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new FDistribution(12, 5));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1060,7 +1060,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextGamma() throws Exception {
+    public void testNextGamma() {
         double[] quartiles;
         long[] counts;
 
@@ -1086,7 +1086,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextT() throws Exception {
+    public void testNextT() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new TDistribution(10));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1098,7 +1098,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextWeibull() throws Exception {
+    public void testNextWeibull() {
         double[] quartiles = TestUtils.getDistributionQuartiles(new WeibullDistribution(1.2, 2.1));
         long[] counts = new long[4];
         randomData.reSeed(1000);
@@ -1110,7 +1110,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextBinomial() throws Exception {
+    public void testNextBinomial() {
         BinomialDistributionTest testInstance = new BinomialDistributionTest();
         int[] densityPoints = testInstance.makeDensityTestPoints();
         double[] densityValues = testInstance.makeDensityTestValues();
@@ -1136,7 +1136,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextHypergeometric() throws Exception {
+    public void testNextHypergeometric() {
         HypergeometricDistributionTest testInstance = new HypergeometricDistributionTest();
         int[] densityPoints = testInstance.makeDensityTestPoints();
         double[] densityValues = testInstance.makeDensityTestValues();
@@ -1162,7 +1162,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextPascal() throws Exception {
+    public void testNextPascal() {
         PascalDistributionTest testInstance = new PascalDistributionTest();
         int[] densityPoints = testInstance.makeDensityTestPoints();
         double[] densityValues = testInstance.makeDensityTestValues();
@@ -1187,7 +1187,7 @@ public class RandomDataTest {
     }
 
     @Test
-    public void testNextZipf() throws Exception {
+    public void testNextZipf() {
         ZipfDistributionTest testInstance = new ZipfDistributionTest();
         int[] densityPoints = testInstance.makeDensityTestPoints();
         double[] densityValues = testInstance.makeDensityTestValues();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomGeneratorAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomGeneratorAbstractTest.java?rev=1364028&r1=1364027&r2=1364028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomGeneratorAbstractTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/RandomGeneratorAbstractTest.java Sat Jul 21 00:42:49 2012
@@ -101,7 +101,7 @@ public abstract class RandomGeneratorAbs
      * other tests and the generator is not reseeded, so this is a fixed seed
      * test.
      */
-    public void testNextIntDirect() throws Exception {
+    public void testNextIntDirect() {
         // Set up test values - end of the array filled randomly
         int[] testValues = new int[] {4, 10, 12, 32, 100, 10000, 0, 0, 0, 0};
         for (int i = 6; i < 10; i++) {
@@ -337,7 +337,7 @@ public abstract class RandomGeneratorAbs
     }
 
     @Test
-    public void testNexBytes() throws Exception {
+    public void testNexBytes() {
         long[] count = new long[256];
         byte[] bytes = new byte[10];
         double[] expected = new double[256];
@@ -359,7 +359,7 @@ public abstract class RandomGeneratorAbs
     }
 
     @Test
-    public void testSeeding() throws Exception {
+    public void testSeeding() {
         // makeGenerator initializes with fixed seed
         RandomGenerator gen = makeGenerator();
         RandomGenerator gen1 = makeGenerator();
@@ -372,7 +372,7 @@ public abstract class RandomGeneratorAbs
         checkSameSequence(gen, gen1);
     }
 
-    private void checkSameSequence(RandomGenerator gen1, RandomGenerator gen2) throws Exception {
+    private void checkSameSequence(RandomGenerator gen1, RandomGenerator gen2) {
         final int len = 11;  // Needs to be an odd number to check MATH-723
         final double[][] values = new double[2][len];
         for (int i = 0; i < len; i++) {



Mime
View raw message