[kaffe] CVS kaffe (kaz): test/regression/InetSocketAddressTest.java:
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Thu Sep 11 08:53:02 2003
PatchSet 4024
Date: 2003/09/11 15:50:35
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2003-09-09 Ito Kazumitsu <kaz@maczuka.gcd.org>
* test/regression/InetSocketAddressTest.java:
check whether new InetSocketAddress("localhost", 0) is an IPv6 address.
Members:
ChangeLog:1.1620->1.1621
test/regression/InetSocketAddressTest.java:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1620 kaffe/ChangeLog:1.1621
--- kaffe/ChangeLog:1.1620 Thu Sep 11 15:02:22 2003
+++ kaffe/ChangeLog Thu Sep 11 15:50:35 2003
@@ -3,6 +3,9 @@
* test/regression/InetAddressTest.java:
check whether InetAddress.getByName returns IPv6 address.
+ * test/regression/InetSocketAddressTest.java:
+ check whether new InetSocketAddress("localhost", 0) is an IPv6 address.
+
2003-09-09 Guilhem Lavaux <guilhem@kaffe.org>
* libraries/javalib/java/net/InetAddress.java:
Index: kaffe/test/regression/InetSocketAddressTest.java
diff -u kaffe/test/regression/InetSocketAddressTest.java:1.1 kaffe/test/regression/InetSocketAddressTest.java:1.2
--- kaffe/test/regression/InetSocketAddressTest.java:1.1 Fri Feb 21 09:51:11 2003
+++ kaffe/test/regression/InetSocketAddressTest.java Thu Sep 11 15:50:36 2003
@@ -1,5 +1,6 @@
import java.net.InetAddress;
+import java.net.Inet6Address;
import java.net.InetSocketAddress;
/**
@@ -45,7 +46,7 @@
+ isa.getHostName()
+ ": "
+ isa.isUnresolved());
- System.out.println("Resolved toString(): " + isa);
+ System.out.println("Resolved toString(): " + check(isa));
if( isa.equals(new InetSocketAddress("localhost", 128)) )
{
System.out.println("Bad equals?");
@@ -64,6 +65,18 @@
System.out.println("Null address is wildcard: "
+ isa.getAddress().isAnyLocalAddress());
}
+
+ private static String check(InetSocketAddress isa)
+ {
+ if (isa.getAddress() instanceof Inet6Address) {
+ if (isa.toString().equals("localhost/::::::::1:0"))
+ {
+ return "localhost/127.0.0.1:0";
+ }
+ }
+ return isa.toString();
+ }
+
}
/* Expected Output: