From: David Daney <ddaney@avtrex.com>
To: mauve-patches <mauve-patches@sources.redhat.com>
Subject: FYI: New java.net.Socet test.
Date: Thu, 13 Mar 2008 04:57:00 -0000 [thread overview]
Message-ID: <47D8B416.3090101@avtrex.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
This is a patch I have had in my local tree for a while. I wrote it
when I was hacking around on libgcj's Socket code.
Commited.
2008-03-12 David Daney <ddaney@avtrex.com>
* gnu/testlet/java/net/Socket/jdk14.java (test): Add 'bind to any
local address' test.
[-- Attachment #2: mauve.patch --]
[-- Type: text/x-patch, Size: 993 bytes --]
Index: gnu/testlet/java/net/Socket/jdk14.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/Socket/jdk14.java,v
retrieving revision 1.6
diff -u -p -r1.6 jdk14.java
--- gnu/testlet/java/net/Socket/jdk14.java 8 Nov 2005 21:49:39 -0000 1.6
+++ gnu/testlet/java/net/Socket/jdk14.java 13 Mar 2008 04:50:10 -0000
@@ -78,5 +78,29 @@ public class jdk14 implements Testlet
server.close();
} catch(IOException ignored) {}
}
+
+ try
+ {
+ harness.checkPoint("bind to any local address");
+ sock = new Socket();
+ InetAddress ia = null;
+ InetSocketAddress sa = new InetSocketAddress(ia, 30006);
+ sock.bind(sa);
+ harness.check(true);
+ }
+ catch (Exception e)
+ {
+ harness.debug(e);
+ harness.fail("unexpected error: bind() threw an exception");
+ }
+ finally
+ {
+ try
+ {
+ if (sock != null)
+ sock.close();
+ }
+ catch(IOException ignored) {}
+ }
}
}
reply other threads:[~2008-03-13 4:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47D8B416.3090101@avtrex.com \
--to=ddaney@avtrex.com \
--cc=mauve-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).