harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r514616 - in /harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony: luni/tests/internal/ luni/tests/internal/net/ luni/tests/internal/net/www/ luni/tests/internal/net/www/protocol/ luni/tests/internal/net/www/protoc...
Date Mon, 05 Mar 2007 09:17:43 GMT
Author: liangyx
Date: Mon Mar  5 01:17:42 2007
New Revision: 514616

URL: http://svn.apache.org/viewvc?view=rev&rev=514616
Log:
refactor tests in org.apache.harmony.tests into org.apache.harmony.luni.tests

Added:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
      - copied from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/
      - copied from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/https/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URITest.java
      - copied, changed from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URITest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
      - copied, changed from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLEncoderTest.java
      - copied, changed from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLEncoderTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLTest.java
      - copied, changed from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/
      - copied from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/test_protocol/
Removed:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/https/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/
Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java?view=diff&rev=514616&r1=514512&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
Mon Mar  5 01:17:42 2007
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.harmony.tests.internal.net.www.protocol.http;
+package org.apache.harmony.luni.tests.internal.net.www.protocol.http;
 
 import java.io.IOException;
 import java.net.Authenticator;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java?view=diff&rev=514616&r1=514512&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java
Mon Mar  5 01:17:42 2007
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.harmony.tests.internal.net.www.protocol.https;
+package org.apache.harmony.luni.tests.internal.net.www.protocol.https;
 
 import java.io.File;
 import java.io.FileInputStream;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java?view=diff&rev=514616&r1=514615&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
Mon Mar  5 01:17:42 2007
@@ -197,6 +197,12 @@
         } finally {
             System.setSecurityManager(oldman);
         }
+        
+        //Regression for HARMONY-56
+        InetAddress[] ia = InetAddress.getAllByName(null);
+        assertEquals("Assert 0: No loopback address", 1, ia.length);
+        assertTrue("Assert 1: getAllByName(null) not loopback",
+                ia[0].isLoopbackAddress());
 	}
 
 	/**
@@ -396,6 +402,11 @@
         InetAddress ia2 = InetAddress
                 .getByName(Support_Configuration.InetTestIP);
         assertEquals("/" + Support_Configuration.InetTestIP, ia2.toString());
+        // Regression for HARMONY-84
+        InetAddress addr = InetAddress.getByName("localhost");
+        assertEquals("Assert 0: wrong string from name", "localhost/127.0.0.1", addr.toString());
+        InetAddress addr2 = InetAddress.getByAddress(new byte[]{127, 0, 0, 1});
+        assertEquals("Assert 1: wrong string from address", "/127.0.0.1", addr2.toString());
     }
 
 	/**
@@ -576,6 +587,19 @@
                 InetAddress.getByName("localhost"), COMPARATOR);
     }
 
+    /**
+     * @tests java.net.InetAddress#getByAddress(byte[])
+     */
+    public void test_getByAddress() {
+        // Regression for HARMONY-61
+        try {
+            InetAddress.getByAddress(null);
+            fail("Assert 0: UnknownHostException must be thrown");
+        } catch (UnknownHostException e) {
+            // Expected
+        }
+    }
+    
     class MockSecurityManager extends SecurityManager {        
         public void checkPermission(Permission permission) {
             if (permission.getName().equals("setSecurityManager")){

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URITest.java
(from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URITest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URITest.java?view=diff&rev=514616&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URITest.java&r1=514512&p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URITest.java&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URITest.java
Mon Mar  5 01:17:42 2007
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.apache.harmony.tests.java.net;
+package org.apache.harmony.luni.tests.java.net;
 
 import java.net.URI;
 import java.net.URISyntaxException;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
(from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java?view=diff&rev=514616&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java&r1=514512&p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
Mon Mar  5 01:17:42 2007
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.apache.harmony.tests.java.net;
+package org.apache.harmony.luni.tests.java.net;
 
 import java.io.IOException;
 import java.net.MalformedURLException;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLEncoderTest.java
(from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLEncoderTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLEncoderTest.java?view=diff&rev=514616&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLEncoderTest.java&r1=514512&p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLEncoderTest.java&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLEncoderTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLEncoderTest.java
Mon Mar  5 01:17:42 2007
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.apache.harmony.tests.java.net;
+package org.apache.harmony.luni.tests.java.net;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLTest.java
(from r514512, harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLTest.java?view=diff&rev=514616&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLTest.java&r1=514512&p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLTest.java&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLTest.java
Mon Mar  5 01:17:42 2007
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.apache.harmony.tests.java.net;
+package org.apache.harmony.luni.tests.java.net;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -70,7 +70,7 @@
 		// Regression test for Harmony-3094
         final String HANDLER_PKGS = "java.protocol.handler.pkgs";
 		String pkgs = System.getProperty(HANDLER_PKGS);
-		System.setProperty(HANDLER_PKGS, "fake|org.apache.harmony.tests.java.net");
+		System.setProperty(HANDLER_PKGS, "fake|org.apache.harmony.luni.tests.java.net");
 
 		try {
 			new URL("test_protocol", "", "fake.jar");

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java?view=diff&rev=514616&r1=514512&r2=514616
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java
Mon Mar  5 01:17:42 2007
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.harmony.tests.java.net.test_protocol;
+package org.apache.harmony.luni.tests.java.net.test_protocol;
 
 import java.io.IOException;
 import java.net.URL;



Mime
View raw message