Fixed multithreaded NextSubTest() output problems

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@157 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder
2002-07-12 20:30:45 +00:00
parent 40ea65d602
commit 0a99bdf489
6 changed files with 131 additions and 20 deletions
+11 -1
View File
@@ -6,6 +6,7 @@
#include <TestCase.h>
#include <map>
#include <string>
#include <vector>
//! Base class for single threaded unit tests
class BThreadedTestCase : public BTestCase {
@@ -23,7 +24,14 @@ public:
//! Restores the current working directory to last directory saved by a call to SaveCWD().
void RestoreCWD(const char *alternate = NULL);
void InitThreadInfo(thread_id id, std::string threadName);
bool RegisterForUse();
void UnregisterForUse();
std::vector<std::string>& AcquireUpdateList();
void ReleaseUpdateList();
protected:
bool fInUse;
// friend class ThreadManager<BThreadedTestCase>;
std::string fProgressSeparator;
@@ -32,7 +40,9 @@ protected:
int32 subTestNum;
};
std::map<thread_id, ThreadSubTestInfo*> fNumberMap;
BLocker *fNumberMapLock;
std::vector<std::string> fUpdateList;
BLocker *fUpdateLock;
};
#endif // _beos_threaded_test_case_h_