[kaffe] CVS kaffe (kaz): test/regression/InetAddressTest.java,

Kaffe CVS cvs-commits at kaffe.org
Thu Jan 4 18:04:48 PST 2007


PatchSet 7457 
Date: 2007/01/05 02:04:04
Author: kaz
Branch: HEAD
Tag: (none) 
Log:
2007-01-05  Ito Kazumitsu  <kaz at maczuka.gcd.org>

	* test/regression/InetAddressTest.java,
	test/regression/InetSocketAddressTest.java: Modified so that various
	expressions of IPv6 address of localhost can be accepted.

Members: 
	ChangeLog:1.4957->1.4958 
	test/regression/InetAddressTest.java:1.2->1.3 
	test/regression/InetSocketAddressTest.java:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4957 kaffe/ChangeLog:1.4958
--- kaffe/ChangeLog:1.4957	Thu Jan  4 07:56:04 2007
+++ kaffe/ChangeLog	Fri Jan  5 02:04:04 2007
@@ -1,3 +1,9 @@
+2007-01-05  Ito Kazumitsu  <kaz at maczuka.gcd.org>
+
+	* test/regression/InetAddressTest.java,
+	test/regression/InetSocketAddressTest.java: Modified so that various
+	expressions of IPv6 address of localhost can be accepted.
+
 2007-01-04  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/javalib/external/classpath/ : Resynced with GNU Classpath until
Index: kaffe/test/regression/InetAddressTest.java
diff -u kaffe/test/regression/InetAddressTest.java:1.2 kaffe/test/regression/InetAddressTest.java:1.3
--- kaffe/test/regression/InetAddressTest.java:1.2	Thu Sep 11 15:02:23 2003
+++ kaffe/test/regression/InetAddressTest.java	Fri Jan  5 02:04:04 2007
@@ -26,11 +26,17 @@
     private static String check(InetAddress ia)
          throws Throwable
     {
-        String expected = (
-            ia instanceof Inet6Address ?
-                "localhost/::::::::1" :
-	        "localhost/127.0.0.1" );
-        if (ia.toString().equals(expected)) return "localhost/127.0.0.1";
+	if (ia instanceof Inet6Address) {
+	    if (ia.toString().equals("localhost/::::::::1") ||
+		ia.toString().equals("localhost/0:0:0:0:0:0:0:1")) {
+		return "localhost/127.0.0.1";
+	    }
+	}
+	else {
+	    if (ia.toString().equals("localhost/127.0.0.1")) {
+		return "localhost/127.0.0.1";
+	    }
+	}
         return ia.toString();
     }
 
Index: kaffe/test/regression/InetSocketAddressTest.java
diff -u kaffe/test/regression/InetSocketAddressTest.java:1.2 kaffe/test/regression/InetSocketAddressTest.java:1.3
--- kaffe/test/regression/InetSocketAddressTest.java:1.2	Thu Sep 11 15:50:36 2003
+++ kaffe/test/regression/InetSocketAddressTest.java	Fri Jan  5 02:04:04 2007
@@ -69,7 +69,8 @@
     private static String check(InetSocketAddress isa)
     {
         if (isa.getAddress() instanceof Inet6Address) {
-            if (isa.toString().equals("localhost/::::::::1:0"))
+            if (isa.toString().equals("localhost/::::::::1:0") ||
+                isa.toString().equals("localhost/0:0:0:0:0:0:0:1:0"))
             {
                 return "localhost/127.0.0.1:0";
             }




More information about the kaffe mailing list