It is accomplished ...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
ejakowatz
2002-07-09 12:24:59 +00:00
commit 52a3801208
2025 changed files with 472889 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#include <TestShell.h>
#include <iostream>
#include <Path.h>
#include <stdio.h>
TestShell::TestShell(const std::string &description, SyncObject *syncObject)
: CppUnitShell(description, syncObject),
fTestDir(NULL)
{
}
TestShell::~TestShell()
{
delete fTestDir;
}
int
TestShell::Run(int argc, char *argv[])
{
// Let's hope BPath does work. ;-)
BPath path(argv[0]);
if (path.InitCheck() == B_OK) {
fTestDir = new BPath();
if (path.GetParent(fTestDir) != B_OK)
printf("Couldn't get test dir.\n");
} else
printf("Couldn't find the path to the test app.\n");
return CppUnitShell::Run(argc, argv);
}
const char*
TestShell::TestDir() const
{
return (fTestDir ? fTestDir->Path() : NULL);
}