Author: psteitz
Date: Sat Oct 15 17:09:16 2005
New Revision: 321515

URL: http://svn.apache.org/viewcvs?rev=321515&view=rev
Log:
Added missing fail statements to some MathUtils tests.
PR# 37095
Reported by elharo at metalab dot unc dot edu

Modified:
    
jakarta/commons/proper/math/branches/MATH_1_1/src/test/org/apache/commons/math/util/MathUtilsTest.java

Modified: 
jakarta/commons/proper/math/branches/MATH_1_1/src/test/org/apache/commons/math/util/MathUtilsTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/math/branches/MATH_1_1/src/test/org/apache/commons/math/util/MathUtilsTest.java?rev=321515&r1=321514&r2=321515&view=diff
==============================================================================
--- 
jakarta/commons/proper/math/branches/MATH_1_1/src/test/org/apache/commons/math/util/MathUtilsTest.java
 (original)
+++ 
jakarta/commons/proper/math/branches/MATH_1_1/src/test/org/apache/commons/math/util/MathUtilsTest.java
 Sat Oct 15 17:09:16 2005
@@ -46,9 +46,11 @@
         assertEquals(big, MathUtils.addAndCheck(big, 0));
         try {
             int res = MathUtils.addAndCheck(big, 1);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
         try {
             int res = MathUtils.addAndCheck(bigNeg, -1);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
     }
     
@@ -58,9 +60,11 @@
         assertEquals(big, MathUtils.mulAndCheck(big, 1));
         try {
             int res = MathUtils.mulAndCheck(big, 2);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
         try {
             int res = MathUtils.mulAndCheck(bigNeg, 2);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
     }
     
@@ -70,9 +74,11 @@
         assertEquals(big, MathUtils.subAndCheck(big, 0));
         try {
             int res = MathUtils.subAndCheck(big, -1);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
         try {
             int res = MathUtils.subAndCheck(bigNeg, 1);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {}
     }
     
@@ -81,6 +87,7 @@
         int bigNeg = Integer.MIN_VALUE;
         try {
             int res = MathUtils.subAndCheck(big, -1);
+            fail("Expecting ArithmeticException");
         } catch (ArithmeticException ex) {
             assertEquals("overflow: subtract", ex.getMessage());
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to