Repository: commons-math
Updated Branches:
  refs/heads/master 50d293912 -> 35e0ba449


Fixed over-zealous "search-and-replace".


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/35e0ba44
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/35e0ba44
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/35e0ba44

Branch: refs/heads/master
Commit: 35e0ba449325e759e04203fcaa71920cf473baef
Parents: 50d2939
Author: Gilles <[email protected]>
Authored: Thu May 4 02:22:53 2017 +0200
Committer: Gilles <[email protected]>
Committed: Thu May 4 02:22:53 2017 +0200

----------------------------------------------------------------------
 .../commons/math4/fraction/FractionTest.java    | 28 ++++++++++----------
 .../math4/util/CombinatoricsUtilsTest.java      |  6 ++---
 2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/35e0ba44/src/test/java/org/apache/commons/math4/fraction/FractionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/fraction/FractionTest.java 
b/src/test/java/org/apache/commons/math4/fraction/FractionTest.java
index 136ab1f..95a5368 100644
--- a/src/test/java/org/apache/commons/math4/fraction/FractionTest.java
+++ b/src/test/java/org/apache/commons/math4/fraction/FractionTest.java
@@ -52,13 +52,13 @@ public class FractionTest {
         try {
             new Fraction(Integer.MIN_VALUE, -1);
             Assert.fail();
-        } catch (ArithmeticException ex) {
+        } catch (MathArithmeticException ex) {
             // success
         }
         try {
             new Fraction(1, Integer.MIN_VALUE);
             Assert.fail();
-        } catch (ArithmeticException ex) {
+        } catch (MathArithmeticException ex) {
             // success
         }
 
@@ -295,8 +295,8 @@ public class FractionTest {
         f = new Fraction(0, 3);
         try {
             f = f.reciprocal();
-            Assert.fail("expecting ArithmeticException");
-        } catch (ArithmeticException ex) {}
+            Assert.fail("expecting MathArithmeticException");
+        } catch (MathArithmeticException ex) {}
 
         // large values
         f = new Fraction(Integer.MAX_VALUE, 1);
@@ -328,8 +328,8 @@ public class FractionTest {
         f = new Fraction(Integer.MIN_VALUE, 1);
         try {
             f = f.negate();
-            Assert.fail("expecting ArithmeticException");
-        } catch (ArithmeticException ex) {}
+            Assert.fail("expecting MathArithmeticException");
+        } catch (MathArithmeticException ex) {}
     }
 
     @Test
@@ -392,8 +392,8 @@ public class FractionTest {
         f2 = new Fraction(-1,5);
         try {
             f = f1.add(f2); // should overflow
-            Assert.fail("expecting ArithmeticException but got: " + 
f.toString());
-        } catch (ArithmeticException ex) {}
+            Assert.fail("expecting MathArithmeticException but got: " + 
f.toString());
+        } catch (MathArithmeticException ex) {}
 
         try {
             f= new Fraction(-Integer.MAX_VALUE, 1);
@@ -429,8 +429,8 @@ public class FractionTest {
         Fraction f2 = Fraction.ZERO;
         try {
             f1.divide(f2);
-            Assert.fail("expecting ArithmeticException");
-        } catch (ArithmeticException ex) {}
+            Assert.fail("expecting MathArithmeticException");
+        } catch (MathArithmeticException ex) {}
 
         f1 = new Fraction(0, 5);
         f2 = new Fraction(2, 7);
@@ -555,8 +555,8 @@ public class FractionTest {
         f2 = new Fraction(1,5);
         try {
             f = f1.subtract(f2); // should overflow
-            Assert.fail("expecting ArithmeticException but got: " + 
f.toString());
-        } catch (ArithmeticException ex) {}
+            Assert.fail("expecting MathArithmeticException but got: " + 
f.toString());
+        } catch (MathArithmeticException ex) {}
 
         try {
             f= new Fraction(Integer.MIN_VALUE, 1);
@@ -599,8 +599,8 @@ public class FractionTest {
         Assert.assertTrue(Fraction.ZERO.equals(Fraction.getReducedFraction(0, 
-1)));
         try {
             Fraction.getReducedFraction(1, 0);
-            Assert.fail("expecting ArithmeticException");
-        } catch (ArithmeticException ex) {
+            Assert.fail("expecting MathArithmeticException");
+        } catch (MathArithmeticException ex) {
             // expected
         }
         Assert.assertEquals(Fraction.getReducedFraction

http://git-wip-us.apache.org/repos/asf/commons-math/blob/35e0ba44/src/test/java/org/apache/commons/math4/util/CombinatoricsUtilsTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/math4/util/CombinatoricsUtilsTest.java 
b/src/test/java/org/apache/commons/math4/util/CombinatoricsUtilsTest.java
index 56d4b45..b3798d5 100644
--- a/src/test/java/org/apache/commons/math4/util/CombinatoricsUtilsTest.java
+++ b/src/test/java/org/apache/commons/math4/util/CombinatoricsUtilsTest.java
@@ -248,8 +248,8 @@ public class CombinatoricsUtilsTest {
         }
         try {
             CombinatoricsUtils.factorial(21);
-            Assert.fail("expecting ArithmeticException");
-        } catch (ArithmeticException ex) {
+            Assert.fail("expecting MathArithmeticException");
+        } catch (MathArithmeticException ex) {
             // ignored
         }
         Assert.assertTrue("expecting infinite factorial value", 
Double.isInfinite(CombinatoricsUtils.factorialDouble(171)));
@@ -307,7 +307,7 @@ public class CombinatoricsUtilsTest {
         CombinatoricsUtils.stirlingS2(3, 4);
     }
 
-    @Test(expected=ArithmeticException.class)
+    @Test(expected=MathArithmeticException.class)
     public void testStirlingS2Overflow() {
         CombinatoricsUtils.stirlingS2(26, 9);
     }

Reply via email to