You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/02/18 23:47:56 UTC

svn commit: r911630 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java

Author: hindessm
Date: Thu Feb 18 22:47:56 2010
New Revision: 911630

URL: http://svn.apache.org/viewvc?rev=911630&view=rev
Log:
Fixing order of expected and actual so you get better error messages
on failure (such as when running on the RI).

Puzzle of the day: Why does:

  test_addRequestPropertyLjava_lang_StringLjava_lang_String

not make any calls to addRequestProperty?  I think this test class needs
a little attention.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java?rev=911630&r1=911629&r2=911630&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java Thu Feb 18 22:47:56 2010
@@ -274,13 +274,13 @@
      */
     public void test_getContentType_regression() throws IOException {
         // Regression for HARMONY-4699
-        assertEquals(getContentType("test.rtf"), "application/rtf");
-        assertEquals(getContentType("test.java"), "text/plain");
+        assertEquals("application/rtf", getContentType("test.rtf"));
+        assertEquals("text/plain", getContentType("test.java"));
         // RI would return "content/unknown"
-        assertEquals(getContentType("test.doc"), "application/msword");
-        assertEquals(getContentType("test.htx"), "text/html");
-        assertEquals(getContentType("test.xml"), "application/xml");
-        assertEquals(getContentType("."), "text/plain");
+        assertEquals("application/msword", getContentType("test.doc"));
+        assertEquals("text/html", getContentType("test.htx"));
+        assertEquals("application/xml", getContentType("test.xml"));
+        assertEquals("text/plain", getContentType("."));
     }
 
     /**