javax.swing.SwingUtilities - new tests

Michael Koch konqueror@gmx.de
Wed Nov 17 22:51:00 GMT 2004


Am Mittwoch, 17. November 2004 23:46 schrieb David Gilbert:
> I've committed these new tests:
>
> 2004-11-17  David Gilbert  <david.gilbert@object-refinery.com>
>
>  * gnu/testlet/javax/swing/SwingUtilities/computeIntersection.java,
>  gnu/testlet/javax/swing/SwingUtilities/computeUnion.java,
>  gnu/testlet/javax/swing/SwingUtilities/isRectangleContainingRectan
>gle.java: New tests.
>
> See the attached patch.

+    harness.checkPoint("Null arguments");
+    // test null argument - the API spec doesn't specify what should
+    // happen, but a NullPointerException is the usual result 
elsewhere
+    try
+    {
+      /* Rectangle r2 = */ SwingUtilities.computeIntersection(1, 2, 
3, 4, null);
+      harness.check(false);
+    }
+    catch (NullPointerException e) 
+    {
+      harness.check(true);
+    }

We spoke about it in private mail. This test gets silently ignored 
when some exception other then NullPointerException gets thrown.


Michael
-- 
Homepage: http://www.worldforge.org/



More information about the Mauve-patches mailing list