From: Tania Bento <tbento@redhat.com>
To: mauve-patches <mauve-patches@sources.redhat.com>
Subject: FYI: Added new test
Date: Tue, 03 Jul 2007 14:47:00 -0000 [thread overview]
Message-ID: <1183474068.18659.21.camel@toothpaste.toronto.redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
This patch adds a new test to gnu.testlet.java.lang.Integer.parseInt.
It checks that a NumberFormatException is thrown if only "+" is passed
as an argument. I've already committed this patch.
2007-07-03 Tania Bento <tbento@redhat.com>
* gnu/testlet/java/lang/Integer/parseInt.java:
(test): Added new test.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 722 bytes --]
Index: gnu/testlet/java/lang/Integer/parseInt.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Integer/parseInt.java,v
retrieving revision 1.2
diff -u -r1.2 parseInt.java
--- gnu/testlet/java/lang/Integer/parseInt.java 29 Jun 2007 19:39:44 -0000 1.2
+++ gnu/testlet/java/lang/Integer/parseInt.java 3 Jul 2007 14:27:38 -0000
@@ -95,6 +95,16 @@
harness.check(true);
}
+ try
+ {
+ i = Integer.parseInt("+");
+ harness.fail("Single '+' must throw NumberFormatException");
+ }
+ catch (NumberFormatException nfe)
+ {
+ harness.check(true);
+ }
+
// In JDK1.7, '+' is considered a valid character.
try
{
reply other threads:[~2007-07-03 14:47 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=1183474068.18659.21.camel@toothpaste.toronto.redhat.com \
--to=tbento@redhat.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).