This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: New tests for new class


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)
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]