harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r589736 - in /harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex: Matcher2Test.java PatternErrorTest.java
Date Mon, 29 Oct 2007 16:54:22 GMT
Author: odeakin
Date: Mon Oct 29 09:54:20 2007
New Revision: 589736

URL: http://svn.apache.org/viewvc?rev=589736&view=rev
Log:
Let JUnit deal with unexpected Exceptions rather than catching them ourselves - regex module.

Modified:
    harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/Matcher2Test.java
    harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternErrorTest.java

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/Matcher2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/Matcher2Test.java?rev=589736&r1=589735&r2=589736&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/Matcher2Test.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/Matcher2Test.java
Mon Oct 29 09:54:20 2007
@@ -225,7 +225,7 @@
         try {
             mat.replaceAll(substitutionString);
             fail("IndexOutOfBoundsException should be thrown");
-        } catch (Exception e) {
+        } catch (IndexOutOfBoundsException e) {
         }
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternErrorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternErrorTest.java?rev=589736&r1=589735&r2=589736&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternErrorTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternErrorTest.java
Mon Oct 29 09:54:20 2007
@@ -59,8 +59,9 @@
 		    Pattern.compile("foo",flags);
 		} catch (IllegalArgumentException e) {
 		    // This is the expected exception
-		} catch (Exception e) {
-		    fail();
+                    return;
 		}
+
+                fail("Expected IllegalArgumentException to be thrown");
 	}
 }



Mime
View raw message