summaryrefslogtreecommitdiff
path: root/cpp/test/IceUtil/stacktrace/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
committerJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
commitcbe92e540a7f02f0bdf93192424bd119189365b7 (patch)
tree411c50dc0ae9c669d31a940b1b4903b5deac4f12 /cpp/test/IceUtil/stacktrace/Client.cpp
parentFixed Util.py check for binary installation directory on Windows (diff)
downloadice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'cpp/test/IceUtil/stacktrace/Client.cpp')
-rw-r--r--cpp/test/IceUtil/stacktrace/Client.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/cpp/test/IceUtil/stacktrace/Client.cpp b/cpp/test/IceUtil/stacktrace/Client.cpp
index e5959ae3ae5..642be3cfe8d 100644
--- a/cpp/test/IceUtil/stacktrace/Client.cpp
+++ b/cpp/test/IceUtil/stacktrace/Client.cpp
@@ -8,7 +8,7 @@
// **********************************************************************
#include <IceUtil/StringUtil.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
#include <fstream>
@@ -96,12 +96,20 @@ splitLines(const string& str)
}
-int main(int argc, char* argv[])
+class Client : public Test::TestHelper
+{
+public:
+
+ virtual void run(int argc, char* argv[]);
+};
+
+void
+Client::run(int argc, char* argv[])
{
if(IceUtilInternal::stackTraceImpl() == IceUtilInternal::STNone)
{
cout << "This Ice build cannot capture stack traces" << endl;
- return EXIT_SUCCESS;
+ return;
}
bool optimized = false;
@@ -163,8 +171,10 @@ int main(int argc, char* argv[])
if(!ifs)
{
- cout << "cannot open `" << filename << "`, failed!" << endl;
- return EXIT_FAILURE;
+ ostringstream os;
+ os << "cannot open `" << filename << "`, failed!";
+ cout << os.str() << endl;
+ throw invalid_argument(os.str());
}
// Show which template we use:
@@ -229,6 +239,6 @@ int main(int argc, char* argv[])
}
}
cout << "ok" << endl;
-
- return EXIT_SUCCESS;
}
+
+DEFINE_TEST(Client);