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]

FYI: SimpleAttributeSet.containsAttribute() update


This patch adds one more check to this test:

2006-02-01 David Gilbert <david.gilbert@object-refinery.com>

   * gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java
   (test): Added one more check.

Regards,

Dave
Index: gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java,v
retrieving revision 1.1
diff -u -r1.1 containsAttribute.java
--- gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java	13 Jan 2006 14:58:22 -0000	1.1
+++ gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java	1 Feb 2006 16:45:01 -0000
@@ -75,7 +75,7 @@
       }
     harness.check(pass);
     
-    // try null value
+    // try null value for existing key
     pass = false;
     try
       {
@@ -87,6 +87,18 @@
       }
     harness.check(pass);  
     
+    // try null value for non-existent key
+    pass = false;
+    try
+      {
+        s.containsAttribute("XXX", null);
+      }
+    catch (NullPointerException e) 
+      {
+        pass = true;  
+      }
+    harness.check(pass);  
+    
   }
 
 }
\ No newline at end of file

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