This is the mail archive of the mauve-discuss@sourceware.cygnus.com mailing list for the Mauve project. See the Mauve home page for more information.
> > > Godmar wrote: > > One of my questions is still unanswered, though: how do I find out > > what exception was thrown? > > I've committed a simple fix for this. > Great. Now, for my next "complaint"/suggestion: The notion of verbose failure should be extended to test cases. That requires a) that the harness communicates the information whether or not this is a verbose run to the test. b) that the test case cooperates and is indeed more verbose about failures if asked to. Clearly, b) is somewhat at the discretion of the test writer, so it should be more of a directive, but it requires a), which is the responsibility of the harness writer. It should be easy enough to do. Consider this test: public class IntrospectorTest implements Testlet { public void tryone (TestHarness harness, Class k1, Class k2, boolean force, int dlen, int evlen, int gmlen) { try { BeanInfo b; if (! force && k2 == null) b = Introspector.getBeanInfo (k1); else b = Introspector.getBeanInfo (k1, k2); harness.check (b.getPropertyDescriptors().length == dlen && b.getEventSetDescriptors().length == evlen && b.getMethodDescriptors().length == gmlen); } catch (IntrospectionException e) { harness.check (false); } } public void tryone (TestHarness harness, Class k1, Class k2, int dlen, int evlen, int gmlen) { tryone (harness, k1, k2, false, dlen, evlen, gmlen); } public void tryone (TestHarness harness, Class k, int dlen, int evlen, int gmlen) { tryone (harness, k, null, false, dlen, evlen, gmlen); } public void test (TestHarness harness) { tryone (harness, java.awt.Component.class, 6, 5, 128); tryone (harness, java.util.BitSet.class, 2, 0, 17); tryone (harness, java.lang.Object.class, 1, 0, 9); tryone (harness, java.applet.Applet.class, 24, 6, 168); tryone (harness, java.awt.Button.class, 8, 6, 134); tryone (harness, java.applet.Applet.class, 8, 0, 22); tryone (harness, java.applet.Applet.class, java.awt.Component.class, 18, 1, 65); tryone (harness, java.applet.Applet.class, java.lang.Object.class, 24, 6, 160); tryone (harness, java.applet.Applet.class, null, true, 24, 6, 168); tryone (harness, java.applet.Applet.class, 24, 6, 168); } public IntrospectorTest () { } } Clearly, when I want to debug a failure in that test, I'd like to know what my JVM returned for Introspector.getBeanInfo b.getPropertyDescriptors().length b.getEventSetDescriptors().length b.getMethodDescriptors().length - Godmar