package qat.parser.junitparser;
// JDK imports
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestResult;
import junit.textui.TestRunner;
/**
* This file loads a single QAT file, and will attempt to resolve all keywords in this qat file
* file by first including any .INC statements, and their parent statements etc, until all neccesary files
* have been included.
*
* @author webhiker
* @version 2.3, 17 June 1999
*
*/
public class JUnitTestRunner extends TestRunner {
public JUnitTestRunner() {
}
// the basetesrunner implementations
public void runFailed(java.lang.String msg) {
}
public void testFailed(int i,junit.framework.Test test, java.lang.Throwable t) {
}
public void testEnded(java.lang.String msg) {
// printDebug(msg);
}
public void testStarted(java.lang.String msg) {
// printDebug(msg);
}
// public TestResult run(Test test) {
// return doRun(test);
// }
public TestResult doRun(Test test) {
return doRun(test, false);
}
public TestResult doRun(Test test, boolean wait) {
TestResult result = new TestResult();
result.addListener(this);
test.run(result);
return result;
}
public synchronized void startTest(Test test) {
// printStream.print("<hr>");
// printDebug("Starting "+test.toString());
}
public synchronized void endTest(Test test) {
// long runTime= System.currentTimeMillis()-startTime;
// printDebug("Finished "+test.toString()+" ("+runTime+"ms)");
}
public synchronized void addError(Test test, Throwable t) {
//printError(test.toString());
//t.printStackTrace(printStream);
}
public synchronized void addFailure(Test test, AssertionFailedError t) {
//printFailure(test.toString());
//t.printStackTrace(printStream);
}
}