summaryrefslogtreecommitdiff
path: root/cpp/test/Slice/macros/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-07-17 00:09:35 +0200
committerJose <jose@zeroc.com>2013-07-17 00:09:35 +0200
commit3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86 (patch)
tree26fa5dbd2ff580933dc28b90af40ba9e3ca6fe7b /cpp/test/Slice/macros/Client.cpp
parentFixed ICE-5356 - Consider adding man pages for unix executables (diff)
downloadice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.tar.bz2
ice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.tar.xz
ice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.zip
Fixed ICE-5375 - Consider to add ICE_TRANSLATOR preprocessor macro
Diffstat (limited to 'cpp/test/Slice/macros/Client.cpp')
-rw-r--r--cpp/test/Slice/macros/Client.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/cpp/test/Slice/macros/Client.cpp b/cpp/test/Slice/macros/Client.cpp
new file mode 100644
index 00000000000..b7955fa1367
--- /dev/null
+++ b/cpp/test/Slice/macros/Client.cpp
@@ -0,0 +1,43 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2013 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 <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace Test;
+using namespace std;
+
+int
+main(int argc, char* argv[])
+{
+ int status = EXIT_SUCCESS;
+ try
+ {
+ cout << "Testing Slice predefined macros... " << flush;
+ DefaultPtr d = new Default();
+ test(d->x == 10);
+ test(d->y == 10);
+
+ NoDefaultPtr nd = new NoDefault();
+ test(nd->x != 10);
+ test(nd->y != 10);
+
+ CppOnlyPtr c = new 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;
+}