void TestRegistry::runAllTests (TestResult& result) { bool groupStart = true; result.testsStarted (); for (Utest *test = tests; !test->isNull(); test = test->getNext ()){ if (groupStart) { result.currentGroupStarted(test); groupStart = false; } result.setProgressIndicator(test->getProgressIndicator()); result.countTest(); if (testShouldRun(test, result)) { result.currentTestStarted(test); test->runOneTestWithPlugins(firstPlugin_, result); result.currentTestEnded(test); } if (endOfGroup (test)) { groupStart = true; result.currentGroupEnded(test); } } result.testsEnded (); }
void TestRegistry::runAllTests(TestResult& result) { bool groupStart = true; result.testsStarted(); for (UtestShell *test = tests_; test != NULL; test = test->getNext()) { if (runInSeperateProcess_) test->setRunInSeperateProcess(); if (runIgnored_) test->setRunIgnored(); if (groupStart) { result.currentGroupStarted(test); groupStart = false; } result.countTest(); if (testShouldRun(test, result)) { result.currentTestStarted(test); test->runOneTest(firstPlugin_, result); result.currentTestEnded(test); } if (endOfGroup(test)) { groupStart = true; result.currentGroupEnded(test); } } result.testsEnded(); currentRepetition_++; }
void TestRegistry::listTestGroupAndCaseNames(TestResult& result) { SimpleString groupAndNameList; for (UtestShell *test = tests_; test != NULL; test = test->getNext()) { if (testShouldRun(test, result)) { SimpleString groupAndName; groupAndName += "#"; groupAndName += test->getGroup(); groupAndName += "."; groupAndName += test->getName(); groupAndName += "#"; if (!groupAndNameList.contains(groupAndName)) { groupAndNameList += groupAndName; groupAndNameList += " "; } } } groupAndNameList.replace("#", ""); if (groupAndNameList.endsWith(" ")) groupAndNameList = groupAndNameList.subString(0, groupAndNameList.size() - 1); result.print(groupAndNameList.asCharString()); }
int main(int argc, char *argv[]) { theArgc = argc; theArgv = argv; if (testShouldRun("printf")) printfTest(); if (testShouldRun("ostream")) ostreamTest(); if (testShouldRun("bigint")) bintTestSuite(); if (testShouldRun("bitv")) bitvTestSuite(); if (testShouldRun("list")) listTestSuite(); if (testShouldRun("fname")) fnameTest(); if (testShouldRun("foam")) foamTest(); if (testShouldRun("format")) formatTest(); if (testShouldRun("flog")) flogTest(); if (testShouldRun("jflow")) jflowTest(); if (testShouldRun("tinfer")) tinferTest(); if (testShouldRun("stab")) stabTest(); if (testShouldRun("srcpos")) srcposTest(); if (testShouldRun("absyn")) absynTest(); if (testShouldRun("abnorm")) abnormTest(); if (testShouldRun("abcheck")) abcheckTest(); if (testShouldRun("ablog")) ablogTest(); if (testShouldRun("tform")) tformTest(); if (testShouldRun("scobind")) scobindTest(); if (testShouldRun("syme")) symeTest(); if (testShouldRun("tibup")) tibupTest(); if (testShouldRun("tfsat")) tfsatTest(); testIntEqual("fluidlevel", 0, fluidLevel); testShowSummary(); return testAllPassed() ? 0 : 1; }