commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1197481 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math: analysis/integration/ distribution/ fraction/ stat/regression/
Date Fri, 04 Nov 2011 10:13:15 GMT
Author: sebb
Date: Fri Nov  4 10:13:15 2011
New Revision: 1197481

URL: http://svn.apache.org/viewvc?rev=1197481&view=rev
Log:
Tidy throws clauses

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BetaDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/fraction/BigFractionFormatTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/regression/MillerUpdatingRegressionTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
Fri Nov  4 10:13:15 2011
@@ -18,7 +18,6 @@ package org.apache.commons.math.analysis
 
 import java.util.Random;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -32,7 +31,7 @@ import org.junit.Test;
 public class LegendreGaussIntegratorTest {
 
     @Test
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         UnivariateRealIntegratorImpl integrator = new LegendreGaussIntegrator(5, 1.0e-14,
1.0e-10, 2, 15);
         double min, max, expected, result, tolerance;
@@ -51,7 +50,7 @@ public class LegendreGaussIntegratorTest
     }
 
     @Test
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealIntegrator integrator =
                 new LegendreGaussIntegrator(3,

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/RombergIntegratorTest.java
Fri Nov  4 10:13:15 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.integration;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -42,7 +41,7 @@ public final class RombergIntegratorTest
      * Test of integrator for the sine function.
      */
     @Test
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         UnivariateRealIntegrator integrator = new RombergIntegrator();
         double min, max, expected, result, tolerance;
@@ -66,7 +65,7 @@ public final class RombergIntegratorTest
      * Test of integrator for the quintic function.
      */
     @Test
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealIntegrator integrator = new RombergIntegrator();
         double min, max, expected, result, tolerance;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/SimpsonIntegratorTest.java
Fri Nov  4 10:13:15 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.integration;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -41,7 +40,7 @@ public final class SimpsonIntegratorTest
      * Test of integrator for the sine function.
      */
     @Test
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         UnivariateRealIntegrator integrator = new SimpsonIntegrator();
         double min, max, expected, result, tolerance;
@@ -65,7 +64,7 @@ public final class SimpsonIntegratorTest
      * Test of integrator for the quintic function.
      */
     @Test
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealIntegrator integrator = new SimpsonIntegrator();
         double min, max, expected, result, tolerance;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/TrapezoidIntegratorTest.java
Fri Nov  4 10:13:15 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis.integration;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -41,7 +40,7 @@ public final class TrapezoidIntegratorTe
      * Test of integrator for the sine function.
      */
     @Test
-    public void testSinFunction() throws MathException {
+    public void testSinFunction() {
         UnivariateRealFunction f = new SinFunction();
         UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
         double min, max, expected, result, tolerance;
@@ -65,7 +64,7 @@ public final class TrapezoidIntegratorTe
      * Test of integrator for the quintic function.
      */
     @Test
-    public void testQuinticFunction() throws MathException {
+    public void testQuinticFunction() {
         UnivariateRealFunction f = new QuinticFunction();
         UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
         double min, max, expected, result, tolerance;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BetaDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BetaDistributionTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BetaDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BetaDistributionTest.java
Fri Nov  4 10:13:15 2011
@@ -16,13 +16,12 @@
  */
 package org.apache.commons.math.distribution;
 
-import org.apache.commons.math.MathException;
 import org.junit.Assert;
 import org.junit.Test;
 
 public class BetaDistributionTest {
     @Test
-    public void testCumulative() throws MathException {
+    public void testCumulative() {
         double[] x = new double[]{-0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
1.0, 1.1};
         // all test data computed using R 2.5
         checkCumulative(0.1, 0.1,
@@ -141,7 +140,7 @@ public class BetaDistributionTest {
 
     }
 
-    private void checkCumulative(double alpha, double beta, double[] x, double[] cumes) throws
MathException {
+    private void checkCumulative(double alpha, double beta, double[] x, double[] cumes) {
         BetaDistribution d = new BetaDistributionImpl(alpha, beta);
         for (int i = 0; i < x.length; i++) {
             Assert.assertEquals(cumes[i], d.cumulativeProbability(x[i]), 1e-8);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
Fri Nov  4 10:13:15 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.distribution;
 
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.exception.NotStrictlyPositiveException;
 import org.junit.Assert;
 import org.junit.Test;
@@ -180,7 +179,7 @@ public class NormalDistributionTest exte
    }
 
     @Test
-    public void testMath280() throws MathException {
+    public void testMath280() {
         NormalDistribution normal = new NormalDistributionImpl(0,1);
         double result = normal.inverseCumulativeProbability(0.9986501019683698);
         Assert.assertEquals(3.0, result, defaultTolerance);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TDistributionTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TDistributionTest.java
Fri Nov  4 10:13:15 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.distribu
 import org.apache.commons.math.exception.NotStrictlyPositiveException;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.TestUtils;
 /**
  * Test cases for TDistribution.
@@ -144,7 +143,7 @@ public class TDistributionTest extends C
      * Have chosen problevels from 0.10 to 0.001
      */
     @Test
-    public void nistData() throws MathException{
+    public void nistData(){
         double[] prob = new double[]{ 0.10,0.05,0.025,0.01,0.005,0.001};
         double[] args2 = new double[]{1.886,2.920,4.303,6.965,9.925,22.327};
         double[] args10 = new double[]{1.372,1.812,2.228,2.764,3.169,4.143};
@@ -156,7 +155,7 @@ public class TDistributionTest extends C
         TestUtils.assertEquals(prob, makeNistResults(args100, 100), 1.0e-4);
         return;
     }
-    private double[] makeNistResults(double[] args, int df) throws MathException{
+    private double[] makeNistResults(double[] args, int df){
         TDistribution td =  new TDistributionImpl(df);
         double[] res  = new double[ args.length ];
         for( int i = 0 ; i < res.length ; i++){

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/fraction/BigFractionFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/fraction/BigFractionFormatTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/fraction/BigFractionFormatTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/fraction/BigFractionFormatTest.java
Fri Nov  4 10:13:15 2011
@@ -20,7 +20,6 @@ package org.apache.commons.math.fraction
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.text.NumberFormat;
-import java.text.ParseException;
 import java.util.Locale;
 
 import org.apache.commons.math.exception.MathParseException;
@@ -269,7 +268,7 @@ public class BigFractionFormatTest {
     }
 
     @Test
-    public void testParseBig() throws ParseException {
+    public void testParseBig() {
         BigFraction f1 =
             improperFormat.parse("167213075789791382630275400487886041651764456874403" +
                                  " / " +

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/regression/MillerUpdatingRegressionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/regression/MillerUpdatingRegressionTest.java?rev=1197481&r1=1197480&r2=1197481&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/regression/MillerUpdatingRegressionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/regression/MillerUpdatingRegressionTest.java
Fri Nov  4 10:13:15 2011
@@ -18,7 +18,6 @@ package org.apache.commons.math.stat.reg
 
 import org.apache.commons.math.linear.RealMatrix;
 import org.apache.commons.math.stat.correlation.PearsonsCorrelation;
-import org.apache.commons.math.MathException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.util.FastMath;
 import org.junit.Test;
@@ -233,7 +232,7 @@ public class MillerUpdatingRegressionTes
     }
 
     @Test
-    public void testFilippelli() throws MathException {
+    public void testFilippelli() {
         double[] data = new double[]{
             0.8116, -6.860120914,
             0.9072, -4.324130045,
@@ -385,7 +384,7 @@ public class MillerUpdatingRegressionTes
     }
 
     @Test
-    public void testWampler1() throws MathException {
+    public void testWampler1() {
         double[] data = new double[]{
             1, 0,
             6, 1,
@@ -445,7 +444,7 @@ public class MillerUpdatingRegressionTes
     }
 
     @Test
-    public void testWampler2() throws MathException {
+    public void testWampler2() {
         double[] data = new double[]{
             1.00000, 0,
             1.11111, 1,
@@ -504,7 +503,7 @@ public class MillerUpdatingRegressionTes
     }
 
     @Test
-    public void testWampler3() throws MathException {
+    public void testWampler3() {
         double[] data = new double[]{
             760, 0,
             -2042, 1,
@@ -561,7 +560,7 @@ public class MillerUpdatingRegressionTes
     }
 
     //@Test
-    public void testWampler4() throws MathException {
+    public void testWampler4() {
         double[] data = new double[]{
             75901, 0,
             -204794, 1,
@@ -759,7 +758,7 @@ public class MillerUpdatingRegressionTes
 //    }
 
     @Test
-    public void testOneRedundantColumn() throws MathException {
+    public void testOneRedundantColumn() {
         MillerUpdatingRegression instance = new MillerUpdatingRegression(4, false);
         MillerUpdatingRegression instance2 = new MillerUpdatingRegression(5, false);
         double[][] x = new double[airdata[0].length][];
@@ -822,7 +821,7 @@ public class MillerUpdatingRegressionTes
     }
 
     @Test
-    public void testThreeRedundantColumn() throws MathException {
+    public void testThreeRedundantColumn() {
 
         MillerUpdatingRegression instance = new MillerUpdatingRegression(4, false);
         MillerUpdatingRegression instance2 = new MillerUpdatingRegression(7, false);
@@ -1061,7 +1060,7 @@ public class MillerUpdatingRegressionTes
     
     
     @Test
-    public void testSubsetRegression() throws MathException {
+    public void testSubsetRegression() {
         
         MillerUpdatingRegression instance = new MillerUpdatingRegression(3, true);
         MillerUpdatingRegression redRegression = new MillerUpdatingRegression(2, true);



Mime
View raw message