This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
Re: FYI: New tests for new class
- From: Anthony Balkissoon <abalkiss at redhat dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Tue, 22 Nov 2005 15:14:45 -0500
- Subject: Re: FYI: New tests for new class
- References: <1132688890.3254.25.camel@tony.toronto.redhat.com>
I added more tests to this file.
2005-11-22 Anthony Balkissoon <abalkiss@redhat.com>
* gnu/testlet/javax/swing/text/MaskFormatterTest.java: Added more
tests.
On Tue, 2005-11-22 at 14:48 -0500, Anthony Balkissoon wrote:
> New tests for the class MaskFormatter in javax.swing.text.
>
> 2005-11-22 Anthony Balkissoon <abalkiss@redhat.com>
>
> * gnu/testlet/javax/swing/text/MaskFormatterTest.java: New test.
>
> --Tony
Index: gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java,v
retrieving revision 1.1
diff -u -r1.1 MaskFormatterTest.java
--- gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java 22 Nov 2005 19:46:25 -0000 1.1
+++ gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java 22 Nov 2005 20:12:10 -0000
@@ -78,6 +78,23 @@
exception = true;
}
harness.check (exception);
+
+ // Checks to see if valid/invalid character sets work
+ formatter = new MaskFormatter("T##'FA");
+ formatter.setInvalidCharacters("T");
+ formatter.setValidCharacters("4");
+ harness.check(formatter.valueToString("T44F4"), "T44F4");
+ harness.check(formatter.stringToValue("T44F4"), "T44F4");
+ exception = false;
+ try
+ {
+ formatter.valueToString("T33F3");
+ }
+ catch (ParseException pe2)
+ {
+ exception = true;
+ }
+ harness.check(exception);
}
catch (java.text.ParseException ex)
{