/** * Run the next text from the array. */ void ApplicationController::runNextTest() { if (mTests.size() == 0) { this->finishTesting(); return; } this->log("================================"); ITest* test = mTests[0]; char buffer[BUF_MAX]; sprintf(buffer, "Started %s", test->getTestName().c_str()); this->log(buffer); test->startTest(); }
/** * Notify controller that a test has failed. * @param test Test that failed. */ void ApplicationController::testFailed(ITest& test) { this->log(test.getReason()); this->log("Test failed!"); this->log("================================"); MAUtil::String* testName = new MAUtil::String(test.getTestName()); mFailedTests.add(testName); ITest* testAux = mTests[0]; mTests.remove(0); delete testAux; this->runNextTest(); }