commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1003902 - in /commons/proper/math/branches/MATH_2_X: ./ src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
Date Sat, 02 Oct 2010 22:13:35 GMT
Author: luc
Date: Sat Oct  2 22:13:35 2010
New Revision: 1003902

URL: http://svn.apache.org/viewvc?rev=1003902&view=rev
Log:
backported r1003566 from trunk to branch 2.X
Narrow expected exception

Modified:
    commons/proper/math/branches/MATH_2_X/   (props changed)
    commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java

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

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java?rev=1003902&r1=1003901&r2=1003902&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
Sat Oct  2 22:13:35 2010
@@ -97,16 +97,16 @@ public final class StatUtilsTest extends
 
         try {
             StatUtils.sum(values, 2, 3);
-            assertTrue("Didn't throw exception", false);
-        } catch (Exception e) {
-            assertTrue(true);
+            fail("Expected RuntimeException");
+        } catch (RuntimeException e) {
+            // expected
         }
 
         try {
             StatUtils.sum(values, -1, 2);
-            assertTrue("Didn't throw exception", false);
-        } catch (Exception e) {
-            assertTrue(true);
+            fail("Expected RuntimeException");
+        } catch (RuntimeException e) {
+            // expected
         }
 
     }



Mime
View raw message