This is the mail archive of the
mauve-discuss@sources.redhat.com
mailing list for the Mauve project.
SeverSocket.toString() not specified
- From: Mark Wielaard <mark at klomp dot org>
- To: mauve-discuss at sources dot redhat dot com
- Date: 05 Apr 2002 15:23:10 +0200
- Subject: SeverSocket.toString() not specified
Hi,
The spec for ServerSocket.toString() only says:
Returns the implementation address and implementation port of this
socket as a String.
So no valid test can be made for that method.
InetAddress.toString() also does not have a specification of the
returned String format:
Converts this IP address to a String.
So I propose to drop both tests.
* gnu/testlet/java/net/ServerSocket/ServerSocketTest.java
(test_params): Drop unspecified toString() tests.
Any objections?
Cheers,
Mark
Index: gnu/testlet/java/net/ServerSocket/ServerSocketTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/ServerSocket/ServerSocketTest.java,v
retrieving revision 1.2
diff -u -r1.2 ServerSocketTest.java
--- ServerSocketTest.java 1999/07/12 16:26:14 1.2
+++ ServerSocketTest.java 2002/04/05 13:19:33
@@ -166,14 +166,6 @@
}
catch ( Exception e ){}
- if ( !sock.toString().equals(
-"ServerSocket[addr=all-zeros-broadcast/0.0.0.0,port=0,localport=30000]"))
- harness.fail("Error : test_params failed - 4" + "toString did not return proper values " );
-
- if ( !sock.getInetAddress().toString().equals(
- "all-zeros-broadcast/0.0.0.0"))
- harness.fail("Error : test_params failed - 5" + "getInetAddress did not return proper values " );
-
sock.setSocketFactory( null );
}