Moved the shell variable into main(). Before the R5 UnitTester crashed with a segment violation when destroying globals. No idea why that happened, but now it works again.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5885 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2004-01-03 16:29:55 +00:00
parent 5abde301c1
commit 895a56b247

View File

@ -5,9 +5,9 @@
// ##### Include headers for statically linked tests here #####
//#include <ExampleTest.h>
UnitTesterShell shell("OpenBeOS Unit Testing Framework", new SemaphoreSyncObject);
int main(int argc, char *argv[]) {
UnitTesterShell shell("OpenBeOS Unit Testing Framework", new SemaphoreSyncObject);
// ##### Add test suites for statically linked tests here #####
// shell.AddTest( "Example", ExampleTest::Suite() );
@ -15,7 +15,12 @@ int main(int argc, char *argv[]) {
// Load our dynamically linked tests
return shell.Run(argc, argv);
int result = shell.Run(argc, argv);
// Unset global shell, just to be sure
BTestShell::SetGlobalShell(NULL);
return result;
}
//const std::string UnitTesterShell::defaultLibDir = "./lib";