summaryrefslogtreecommitdiff
path: root/cpp/test/IceUtil/thread/TestBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceUtil/thread/TestBase.h')
-rw-r--r--cpp/test/IceUtil/thread/TestBase.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/cpp/test/IceUtil/thread/TestBase.h b/cpp/test/IceUtil/thread/TestBase.h
new file mode 100644
index 00000000000..5141e6887da
--- /dev/null
+++ b/cpp/test/IceUtil/thread/TestBase.h
@@ -0,0 +1,54 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_BASE_H
+#define TEST_BASE_H
+
+//#include <string>
+
+#include <IceUtil/Shared.h>
+#include <IceUtil/Handle.h>
+
+class TestFailed
+{
+public:
+
+ TestFailed(const std::string& n) : name(n) { }
+
+ std::string name;
+};
+
+class TestBase : public IceUtil::Shared
+{
+public:
+
+ TestBase(const std::string& n) :
+ _name(n)
+ {
+ }
+
+ virtual ~TestBase()
+ {
+ }
+
+ const std::string& name() const { return _name; }
+
+ void start();
+
+protected:
+
+ virtual void run() = 0;
+
+ std::string _name;
+};
+
+typedef IceUtil::Handle<TestBase> TestBasePtr;
+
+#endif