diff --git a/src/tests/UnitTester.cpp b/src/tests/UnitTester.cpp index 07a95ec6b5..f0b40cd3aa 100644 --- a/src/tests/UnitTester.cpp +++ b/src/tests/UnitTester.cpp @@ -1,15 +1,23 @@ #include "UnitTester.h" -#include +#include #include +#include // ##### Include headers for statically linked tests here ##### -#include +//#include -UnitTesterShell shell("OpenBeOS Unit Testing Framework", new LockerSyncObject); +UnitTesterShell shell("OpenBeOS Unit Testing Framework", new SemaphoreSyncObject); int main(int argc, char *argv[]) { // ##### Add test suites for statically linked tests here ##### - shell.AddSuite( "Example", &ExampleTest::Suite ); +// shell.AddTest( "Example", ExampleTest::Suite() ); + + BTestShell::SetShell(&shell); + + // Load our dynamically linked tests + BDirectory libDir("./lib"); + int count = shell.LoadSuitesFrom(&libDir); + cout << "Loaded " << count << " suites" << endl; return shell.Run(argc, argv); } @@ -27,15 +35,15 @@ UnitTesterShell::PrintDescription(int argc, char *argv[]) { cout << "of testing and verifying the various kits, classes, functions," << endl; cout << "and the like that comprise OpenBeOS." << endl; - if (AppName.rfind("UnitTester.R5") != std::string::npos) { + if (AppName.rfind("UnitTester_r5") != std::string::npos) { cout << endl; - cout << "Judging by its name (UnitTester.R5), this copy was" << endl; + cout << "Judging by its name (UnitTester_r5), this copy was" << endl; cout << "probably linked against Be Inc.'s R5 implementations" << endl; cout << "for the sake of comparison." << endl; - } else if (AppName.rfind("UnitTester.OpenBeOS") != std::string::npos) { + } else if (AppName.rfind("UnitTester") != std::string::npos) { cout << endl; - cout << "Judging by its name (UnitTester.OpenBeOS), this copy was probably" << endl; - cout << "linked against our OpenBeOS implementations." << endl; + cout << "Judging by its name (UnitTester), this copy was probably" << endl; + cout << "linked against our own OpenBeOS implementations." << endl; } }