You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/01/17 17:29:12 UTC
cvs commit: xml-xalan/test/java/src/org/apache/qetest Reporter.java
curcuru 01/01/17 08:29:11
Modified: test/java/src/org/apache/qetest Reporter.java
Log:
Added simple check for when numTestCases is set too low
Revision Changes Path
1.5 +21 -1 xml-xalan/test/java/src/org/apache/qetest/Reporter.java
Index: Reporter.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/Reporter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Reporter.java 2000/12/23 22:59:16 1.4
+++ Reporter.java 2001/01/17 16:29:10 1.5
@@ -89,7 +89,7 @@
* @todo explain better how results are rolled up and calculated
* @author Shane_Curcuru@lotus.com
* @author Jo_Grant@lotus.com
- * @version $Id: Reporter.java,v 1.4 2000/12/23 22:59:16 sboag Exp $
+ * @version $Id: Reporter.java,v 1.5 2001/01/17 16:29:10 curcuru Exp $
*/
public class Reporter implements Logger
{
@@ -817,6 +817,8 @@
* Calls back into a Test to run test cases in order.
* <p>Use reflection to call back and execute each testCaseXX method
* in the calling test in order, catching exceptions along the way.</p>
+ * //@todo rename to 'executeTestCases' or something
+ * //@todo implement options: either an inclusion or exclusion list
* @author Shane Curcuru
* @param testObject the test object itself.
* @param numTestCases number of consecutively numbered test cases to execute.
@@ -887,6 +889,24 @@
logThrowable(ERRORMSG, t, tmpErrString);
} // end of catch
} // end of for
+
+ // Convenience functionality: remind user if they appear to
+ // have set numTestCases too low
+ try
+ {
+ // Get a reference to the *next* test case after numTestCases
+ int moreTestCase = numTestCases + 1;
+ currTestCase = testClass.getMethod("testCase" + moreTestCase, noParams);
+
+ // If we get here, we found another testCase - warn the user
+ logWarningMsg("executeTests: extra testCase"+ moreTestCase
+ + " found, perhaps numTestCases is too low?");
+ }
+ catch (Throwable t)
+ {
+ // Ignore errors: we don't care, since they didn't
+ // ask us to look for this method anyway
+ }
// Return true only if everything passed
if (testResult == PASS_RESULT)