summaryrefslogtreecommitdiff
path: root/cppe/test/IceE/thread/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/test/IceE/thread/Client.cpp')
-rw-r--r--cppe/test/IceE/thread/Client.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/cppe/test/IceE/thread/Client.cpp b/cppe/test/IceE/thread/Client.cpp
new file mode 100644
index 00000000000..d1e5a30c45e
--- /dev/null
+++ b/cppe/test/IceE/thread/Client.cpp
@@ -0,0 +1,66 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <IceE/IceE.h>
+
+#include <stdlib.h>
+#include <TestApplication.h>
+
+#include <TestSuite.h>
+
+using namespace std;
+
+class ThreadTestApplication : public TestApplication
+{
+public:
+
+ ThreadTestApplication() :
+ TestApplication("thread test")
+ {
+ }
+
+ virtual int run(int argc, char* argv[])
+ {
+ try
+ {
+ initializeTestSuite();
+
+ for(list<TestBasePtr>::const_iterator p = allTests.begin(); p != allTests.end(); ++p)
+ {
+ (*p)->start();
+ }
+ }
+ catch(const TestFailed& e)
+ {
+ tprintf("test %s failed\n", e.name.c_str());
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
+ }
+};
+
+#ifdef _WIN32_WCE
+
+int WINAPI
+WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
+{
+ ThreadTestApplication app;
+ return app.main(hInstance);
+}
+
+#else
+
+int
+main(int argc, char** argv)
+{
+ ThreadTestApplication app;
+ return app.main(argc, argv);
+}
+
+#endif