< prev index next >

src/com/sun/javatest/TestRunner.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 183      * @param script the script to be used to execute the test
 184      */
 185     void delegateNotifier(Script script) {
 186         script.setNotifier(this.notifier);
 187     }
 188 
 189     /**
 190      * Run the tests obtained from an iterator. The iterator returns
 191      * TestDescription objects for the tests that have been selected to be run.
 192      * The iterator supports the standard hasNext() and next() methods;
 193      * it does not support remove(), which throws UnsupportedOperationException.
 194      * Each test description gives the details of the test to be run.
 195      * As each test is started, the implementation of this method must create
 196      * a new TestResult object and call {@link #notifyStartingTest}.
 197      * When the test completes (however it completes) the implementation of
 198      * this method must call {@link #notifyFinishedTest}.
 199      * @param testIter the iterator to be used to obtain the tests to be run
 200      * @return true if and only if all the tests executed successfully and passed
 201      * @throws InterruptedException if the test run was interrupted
 202      */
 203     protected abstract boolean runTests(Iterator testIter) throws InterruptedException;
 204 
 205     /**
 206      * This method must be called as each test is started, to notify any
 207      * registered observers.
 208      * @param tr the TestResult object for the test that has been started
 209      * @see Harness.Observer
 210      */
 211     protected void notifyStartingTest(TestResult tr) {
 212         notifier.startingTest(tr);
 213     }
 214 
 215     /**
 216      * This method must be called when each test is finished, to notify any
 217      * registered observers.
 218      * @param tr the TestResult object for the test that has been started
 219      * @see Harness.Observer
 220      */
 221     protected void notifyFinishedTest(TestResult tr) {
 222         // this must do the following:
 223         // numTestsDone++;


 183      * @param script the script to be used to execute the test
 184      */
 185     void delegateNotifier(Script script) {
 186         script.setNotifier(this.notifier);
 187     }
 188 
 189     /**
 190      * Run the tests obtained from an iterator. The iterator returns
 191      * TestDescription objects for the tests that have been selected to be run.
 192      * The iterator supports the standard hasNext() and next() methods;
 193      * it does not support remove(), which throws UnsupportedOperationException.
 194      * Each test description gives the details of the test to be run.
 195      * As each test is started, the implementation of this method must create
 196      * a new TestResult object and call {@link #notifyStartingTest}.
 197      * When the test completes (however it completes) the implementation of
 198      * this method must call {@link #notifyFinishedTest}.
 199      * @param testIter the iterator to be used to obtain the tests to be run
 200      * @return true if and only if all the tests executed successfully and passed
 201      * @throws InterruptedException if the test run was interrupted
 202      */
 203     protected abstract boolean runTests(Iterator<TestDescription> testIter) throws InterruptedException;
 204 
 205     /**
 206      * This method must be called as each test is started, to notify any
 207      * registered observers.
 208      * @param tr the TestResult object for the test that has been started
 209      * @see Harness.Observer
 210      */
 211     protected void notifyStartingTest(TestResult tr) {
 212         notifier.startingTest(tr);
 213     }
 214 
 215     /**
 216      * This method must be called when each test is finished, to notify any
 217      * registered observers.
 218      * @param tr the TestResult object for the test that has been started
 219      * @see Harness.Observer
 220      */
 221     protected void notifyFinishedTest(TestResult tr) {
 222         // this must do the following:
 223         // numTestsDone++;
< prev index next >