+ Moved BAutolock and BArchivable over to new testing framework.
+ Added ability to specify entire suites to the UnitTester program. + BAutolock and BArchivable tests now use CPPUNIT_ASSERT, but BLocker tests crash for some unknown reason with said assertion, so plain old vanilla assert() is still used. I'll look into this later. + BArchivable tests that try to load a RemoteTestObject are failing because the resource file doesn't appear to be linked into libsupporttest_RemoteTestObject.so. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -83,11 +83,15 @@ public:
|
||||
static const char* GlobalTestDir() { return (fGlobalShell ? fGlobalShell->TestDir() : NULL); };
|
||||
|
||||
|
||||
protected:
|
||||
protected:
|
||||
typedef std::map<std::string, CppUnit::Test*> TestMap;
|
||||
typedef std::map<std::string, BTestSuite*> SuiteMap;
|
||||
|
||||
VerbosityLevel fVerbosityLevel;
|
||||
std::set<std::string> fTestsToRun;
|
||||
std::map<std::string, CppUnit::Test*> fTests;
|
||||
std::map<std::string, BTestSuite*> fSuites;
|
||||
std::set<std::string> fSuitesToRun;
|
||||
TestMap fTests;
|
||||
SuiteMap fSuites;
|
||||
std::set<std::string> fLibDirs;
|
||||
CppUnit::TestResult fTestResults;
|
||||
CppUnit::TestResultCollector fResultsCollector;
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
// use it inline in tests if necessary.
|
||||
status_t DecodeResult(status_t result);
|
||||
|
||||
// Returns a string version of the given integer
|
||||
std::string IntToStr(int i);
|
||||
|
||||
// Calls system() with the concatenated string of command and parameter.
|
||||
void ExecCommand(const char *command, const char *parameter);
|
||||
|
||||
|
||||
@@ -176,10 +176,13 @@ BThreadedTestCaller<TestClass, ExpectedException>::run(CppUnit::TestResult *resu
|
||||
// If we get this far, we actually managed to acquire the semaphore,
|
||||
// so we should release it now.
|
||||
release_sem_etc(fThreadSem, fThreads.size(), 0);
|
||||
|
||||
// Print out a newline for asthetics :-)
|
||||
printf("\n");
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
// Wait for them all to finish, then clean up
|
||||
for (ThreadManagerMap::iterator i = fThreads.begin();
|
||||
i != fThreads.end ();
|
||||
@@ -254,7 +257,7 @@ BThreadedTestCaller<TestClass, ExpectedException>::tearDown() {
|
||||
template <class TestClass, class ExpectedException>
|
||||
std::string
|
||||
BThreadedTestCaller<TestClass, ExpectedException>::toString() const {
|
||||
return "BThreadedTestCaller for " + getName();
|
||||
return std::string("BThreadedTestCaller for ") + getName();
|
||||
}
|
||||
|
||||
#endif // _beos_threaded_test_caller_h_
|
||||
|
||||
Reference in New Issue
Block a user