harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aiva...@apache.org
Subject svn commit: r567577 - /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java
Date Mon, 20 Aug 2007 07:27:16 GMT
Author: aivanov
Date: Mon Aug 20 00:27:15 2007
New Revision: 567577

URL: http://svn.apache.org/viewvc?rev=567577&view=rev
Log:
Removing redundant try-catch from testResolveURL() as JUnit handles exceptions automatically.

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java?rev=567577&r1=567576&r2=567577&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java
Mon Aug 20 00:27:15 2007
@@ -686,44 +686,40 @@
         }
     }
 
-    public void testResolveURL() {
-        try {
-            // Regression for HARMONY-4529
-            String base = "jar:file:test.jar!/root/current";
-            String relative = "dir/file";
-            String absolute = "http://host/file";
-            URL baseURL = new URL(base);
-            URL absoluteURL = new URL(absolute);
-            URL resolvedURL = new URL("jar:file:test.jar!/root/dir/file");
+    public void testResolveURL() throws Exception {
+        // Regression for HARMONY-4529
+        String base = "jar:file:test.jar!/root/current";
+        String relative = "dir/file";
+        String absolute = "http://host/file";
+        URL baseURL = new URL(base);
+        URL absoluteURL = new URL(absolute);
+        URL resolvedURL = new URL("jar:file:test.jar!/root/dir/file");
 
-            assertEquals(resolvedURL, HTML.resolveURL(relative, base));
-            assertEquals(resolvedURL, HTML.resolveURL(relative, baseURL));
+        assertEquals(resolvedURL, HTML.resolveURL(relative, base));
+        assertEquals(resolvedURL, HTML.resolveURL(relative, baseURL));
 
-            assertEquals(absoluteURL, HTML.resolveURL(absolute, base));
-            assertEquals(absoluteURL, HTML.resolveURL(absolute, baseURL));
-            assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, base));
-            assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, baseURL));
+        assertEquals(absoluteURL, HTML.resolveURL(absolute, base));
+        assertEquals(absoluteURL, HTML.resolveURL(absolute, baseURL));
+        assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, base));
+        assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, baseURL));
 
-            assertEquals(absoluteURL, HTML.resolveURL(absolute, (URL) null));
-            assertEquals(absoluteURL, HTML.resolveURL(absolute, (String) null));
-            assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, (URL) null));
-            assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, (String) null));
+        assertEquals(absoluteURL, HTML.resolveURL(absolute, (URL) null));
+        assertEquals(absoluteURL, HTML.resolveURL(absolute, (String) null));
+        assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, (URL) null));
+        assertEquals(absoluteURL, HTML.resolveURL(absoluteURL, (String) null));
 
-            assertNull(HTML.resolveURL("", base));
-            assertNull(HTML.resolveURL("", baseURL));
-            assertNull(HTML.resolveURL((URL) null, base));
-            assertNull(HTML.resolveURL((URL) null, baseURL));
-            assertNull(HTML.resolveURL((String) null, base));
-            assertNull(HTML.resolveURL((String) null, baseURL));
+        assertNull(HTML.resolveURL("", base));
+        assertNull(HTML.resolveURL("", baseURL));
+        assertNull(HTML.resolveURL((URL) null, base));
+        assertNull(HTML.resolveURL((URL) null, baseURL));
+        assertNull(HTML.resolveURL((String) null, base));
+        assertNull(HTML.resolveURL((String) null, baseURL));
 
-            assertNull(HTML.resolveURL("", (URL) null));
-            assertNull(HTML.resolveURL("", (String) null));
-            assertNull(HTML.resolveURL((URL) null, (URL) null));
-            assertNull(HTML.resolveURL((URL) null, (String) null));
-            assertNull(HTML.resolveURL((String) null, (URL) null));
-            assertNull(HTML.resolveURL((String) null, (String) null));
-        } catch (Exception e) {
-            fail("Unexpected exception: " + e);
-        }
+        assertNull(HTML.resolveURL("", (URL) null));
+        assertNull(HTML.resolveURL("", (String) null));
+        assertNull(HTML.resolveURL((URL) null, (URL) null));
+        assertNull(HTML.resolveURL((URL) null, (String) null));
+        assertNull(HTML.resolveURL((String) null, (URL) null));
+        assertNull(HTML.resolveURL((String) null, (String) null));
     }
 }



Mime
View raw message