javax.swing.SwingUtilities - new tests
Michael Koch
konqueror@gmx.de
Wed Nov 17 22:57:00 GMT 2004
Am Donnerstag, 18. November 2004 00:52 schrieb Michael Koch:
> 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/isRectangleContainingRecta
> >n 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.
Well, wrong again. The framework catches and unexpected exception.
Letting the testcase just fail would be more nice.
Michael
--
Homepage: http://www.worldforge.org/
More information about the Mauve-patches
mailing list