diff options
Diffstat (limited to 'cpp/test/Slice/macros/Client.cpp')
-rw-r--r-- | cpp/test/Slice/macros/Client.cpp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/cpp/test/Slice/macros/Client.cpp b/cpp/test/Slice/macros/Client.cpp index 5bbbd2bc9ac..308a5e53e70 100644 --- a/cpp/test/Slice/macros/Client.cpp +++ b/cpp/test/Slice/macros/Client.cpp @@ -8,32 +8,31 @@ // ********************************************************************** #include <Ice/Ice.h> -#include <TestCommon.h> +#include <TestHelper.h> #include <Test.h> using namespace Test; using namespace std; -int -main(int argc, char* argv[]) +class Client : public Test::TestHelper { - int status = EXIT_SUCCESS; - try - { - cout << "testing Slice predefined macros... " << flush; - DefaultPtr d = ICE_MAKE_SHARED(Default); - test(d->x == 10); - test(d->y == 10); +public: - CppOnlyPtr c = ICE_MAKE_SHARED(CppOnly); - test(c->lang == "cpp"); - test(c->version == ICE_INT_VERSION); - cout << "ok" << endl; - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - return status; + void run(int, char**); +}; + +void +Client::run(int argc, char** argv) +{ + cout << "testing Slice predefined macros... " << flush; + DefaultPtr d = ICE_MAKE_SHARED(Default); + test(d->x == 10); + test(d->y == 10); + + CppOnlyPtr c = ICE_MAKE_SHARED(CppOnly); + test(c->lang == "cpp"); + test(c->version == ICE_INT_VERSION); + cout << "ok" << endl; } + +DEFINE_TEST(Client) |