summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2019-07-15 05:14:32 -0400
committerBenoit Foucher <benoit@zeroc.com>2019-07-15 11:14:32 +0200
commit2e60ce8af12b12a8c1aed18c7bea2413016d4004 (patch)
tree4f5f578bb99ea4713cbc1d0e57346b6036c70f10 /cpp
parentTest script minor warning fixes (diff)
downloadice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.tar.bz2
ice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.tar.xz
ice-2e60ce8af12b12a8c1aed18c7bea2413016d4004.zip
Port to AIX with g++, xlC_r and xlclang++ (#434)
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules1
-rw-r--r--cpp/include/IceUtil/Config.h12
-rw-r--r--cpp/src/IceGrid/Activator.cpp34
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp9
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp4
-rw-r--r--cpp/src/IceSSL/OpenSSLTransceiverI.cpp15
-rw-r--r--cpp/src/IceUtil/UtilException.cpp2
-rw-r--r--cpp/test/Ice/acm/AllTests.cpp6
-rw-r--r--cpp/test/Ice/impl/Makefile.mk4
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.cpp10
-rw-r--r--cpp/test/Ice/operations/BatchOnewaysAMI.cpp9
-rw-r--r--cpp/test/Ice/operations/OnewaysAMI.cpp9
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp304
-rw-r--r--cpp/test/Ice/stringConverter/Client.cpp2
-rw-r--r--cpp/test/Ice/stringConverter/Makefile.mk2
-rw-r--r--cpp/test/Ice/udp/AllTests.cpp19
-rw-r--r--cpp/test/Ice/udp/Server.cpp22
-rw-r--r--cpp/test/IceGrid/fileLock/test.py2
-rw-r--r--cpp/test/IceGrid/session/AllTests.cpp4
-rw-r--r--cpp/test/IceStorm/single/test.py6
-rw-r--r--cpp/test/IceUtil/unicode/Client.cpp6
-rw-r--r--cpp/test/Slice/headers/test.py35
-rw-r--r--cpp/test/Slice/parser/Makefile.mk3
23 files changed, 315 insertions, 205 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index af56ad643cd..8eab4fd7c07 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -98,6 +98,7 @@ endif
# directory.
#
cpp11_cppflags = -DICE_CPP11_MAPPING -std=c++11
+cpp11_ldflags = $(cpp11_cppflags)
cpp11_targetname = $(if $(or $(filter-out $($1_target),program),$(filter $(bindir)%,$($4_targetdir))),++11)
cpp11_targetdir = $(if $(filter %/build,$5),cpp11)
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index a9969c45e57..15fdebb9028 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -21,12 +21,14 @@
#endif
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || \
- (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN))
+ (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)) || \
+ (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
# define ICE_LITTLE_ENDIAN
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN)) || \
- (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN))
+ (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)) || \
+ (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
# define ICE_BIG_ENDIAN
@@ -171,9 +173,9 @@
// With Visual Studio, we can import/export member functions without importing/
// exporting the whole class
# define ICE_MEMBER_IMPORT_EXPORT
-#elif defined(__GNUC__) || defined(__clang__)
-# define ICE_DECLSPEC_EXPORT __attribute__((visibility ("default")))
-# define ICE_DECLSPEC_IMPORT __attribute__((visibility ("default")))
+#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__ibmxl__)
+# define ICE_DECLSPEC_EXPORT __attribute__((visibility("default")))
+# define ICE_DECLSPEC_IMPORT __attribute__((visibility("default")))
#elif defined(__SUNPRO_CC)
# define ICE_DECLSPEC_EXPORT __global
# define ICE_DECLSPEC_IMPORT /**/
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index a9a4508e910..9a9fb38af2b 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -641,25 +641,47 @@ Activator::activate(const string& name,
}
vector<gid_t> groups;
+#ifdef _AIX
+ char* grouplist = getgrset(pw->pw_name);
+ if(grouplist == 0)
+ {
+ throw SyscallException(__FILE__, __LINE__, getSystemErrno());
+ }
+ vector<string> grps;
+ if(IceUtilInternal::splitString(grouplist, ",", grps))
+ {
+ for(vector<string>::const_iterator p = grps.begin(); p != grps.end(); ++p)
+ {
+ gid_t group;
+ istringstream is(*p);
+ if(is >> group)
+ {
+ groups.push_back(group);
+ }
+ }
+ }
+ free(grouplist);
+#else
groups.resize(20);
int ngroups = static_cast<int>(groups.size());
-#if defined(__APPLE__)
+# if defined(__APPLE__)
if(getgrouplist(pw->pw_name, static_cast<int>(gid), reinterpret_cast<int*>(&groups[0]), &ngroups) < 0)
-#else
+# else
if(getgrouplist(pw->pw_name, gid, &groups[0], &ngroups) < 0)
-#endif
+# endif
{
groups.resize(static_cast<size_t>(ngroups));
-#if defined(__APPLE__)
+# if defined(__APPLE__)
getgrouplist(pw->pw_name, static_cast<int>(gid), reinterpret_cast<int*>(&groups[0]), &ngroups);
-#else
+# else
getgrouplist(pw->pw_name, gid, &groups[0], &ngroups);
-#endif
+# endif
}
else
{
groups.resize(static_cast<size_t>(ngroups));
}
+#endif
if(groups.size() > NGROUPS_MAX)
{
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index f80cf673236..9a96452a520 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -32,7 +32,12 @@ using namespace Ice;
using namespace IceInternal;
using namespace IceGrid;
+// Work-around for anonymous namspace bug in xlclang++
+#ifdef __ibmxl__
+namespace IceGridNodeNamespace
+#else
namespace
+#endif
{
class ProcessI : public Process
@@ -110,6 +115,10 @@ setNoIndexingAttribute(const string& path)
}
+#ifdef __ibmxl__
+using namespace IceGridNodeNamespace;
+#endif
+
CollocatedRegistry::CollocatedRegistry(const CommunicatorPtr& com,
const ActivatorPtr& activator,
bool nowarn,
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp
index 9b265a80eda..5b953d0ebb1 100644
--- a/cpp/src/IceGrid/PlatformInfo.cpp
+++ b/cpp/src/IceGrid/PlatformInfo.cpp
@@ -192,7 +192,7 @@ PlatformInfo::PlatformInfo(const string& prefix,
_last15Total = 0;
#elif defined(_AIX)
struct nlist nl;
- nl.n_name = "avenrun";
+ nl.n_name = const_cast<char*>("avenrun");
nl.n_value = 0;
if(knlist(&nl, 1, sizeof(nl)) == 0)
{
@@ -510,7 +510,7 @@ PlatformInfo::getLoadInfo()
{
long long avenrun[3];
struct nlist nl;
- nl.n_name = "avenrun";
+ nl.n_name = const_cast<char*>("avenrun");
nl.n_value = 0;
if(knlist(&nl, 1, sizeof(nl)) == 0)
{
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
index 8acfe25a67e..d33bb6aaf52 100644
--- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
+++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
@@ -553,6 +553,21 @@ OpenSSL::TransceiverI::read(IceInternal::Buffer& buf)
int ret = SSL_read(_ssl, reinterpret_cast<void*>(&*buf.i), packetSize);
if(ret <= 0)
{
+#if defined(_AIX)
+ //
+ // WORKAROUND: OpenSSL SSL_read on AIX sometime ends up reporting a error
+ // with SSL_get_error but there's no error in the error queue. This occurs
+ // when SSL_read needs more data. So we just return SocketOperationRead in
+ // this case.
+ //
+ if(SSL_get_error(_ssl, ret) == SSL_ERROR_SSL && ERR_peek_error() == 0)
+ {
+ if(SSL_want_read(_ssl))
+ {
+ return IceInternal::SocketOperationRead;
+ }
+ }
+#endif
switch(SSL_get_error(_ssl, ret))
{
case SSL_ERROR_NONE:
diff --git a/cpp/src/IceUtil/UtilException.cpp b/cpp/src/IceUtil/UtilException.cpp
index f42b86f89a6..266942bb3de 100644
--- a/cpp/src/IceUtil/UtilException.cpp
+++ b/cpp/src/IceUtil/UtilException.cpp
@@ -43,7 +43,7 @@
# endif
# endif
-# if !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS)
+# if !defined(_AIX) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS)
# include <execinfo.h>
# include <cxxabi.h>
# include <stdint.h>
diff --git a/cpp/test/Ice/acm/AllTests.cpp b/cpp/test/Ice/acm/AllTests.cpp
index f9ca74170f4..d9e81d9370d 100644
--- a/cpp/test/Ice/acm/AllTests.cpp
+++ b/cpp/test/Ice/acm/AllTests.cpp
@@ -166,7 +166,7 @@ public:
}
#ifdef ICE_CPP11_MAPPING
- void join(thread& t)
+ void join(std::thread& t)
#else
void join()
#endif
@@ -735,11 +735,11 @@ allTests(Test::TestHelper* helper)
}
#ifdef ICE_CPP11_MAPPING
- vector<pair<thread, TestCasePtr>> threads;
+ vector<pair<std::thread, TestCasePtr>> threads;
for(auto p = tests.begin(); p != tests.end(); ++p)
{
TestCasePtr testCase = *p;
- thread t([testCase]()
+ std::thread t([testCase]()
{
testCase->run();
});
diff --git a/cpp/test/Ice/impl/Makefile.mk b/cpp/test/Ice/impl/Makefile.mk
index e0b294005f9..d3843d4906d 100644
--- a/cpp/test/Ice/impl/Makefile.mk
+++ b/cpp/test/Ice/impl/Makefile.mk
@@ -36,4 +36,8 @@ endef
$(test)_component_with_config_extensions = make-impl-with-config
+ifeq ($(xlc_compiler),yes)
+ $(test)_cppflags += -qsuppress="1540-0895"
+endif
+
tests += $(test)
diff --git a/cpp/test/Ice/interceptor/MyObjectI.cpp b/cpp/test/Ice/interceptor/MyObjectI.cpp
index b21c01c7a9b..8604cd7007f 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.cpp
+++ b/cpp/test/Ice/interceptor/MyObjectI.cpp
@@ -85,7 +85,7 @@ MyObjectI::amdAddAsync(int x,
function<void(exception_ptr)>,
const Ice::Current&)
{
- thread t(
+ std::thread t(
[x, y, response]()
{
this_thread::sleep_for(chrono::milliseconds(10));
@@ -101,7 +101,7 @@ MyObjectI::amdAddWithRetryAsync(int x,
function<void(exception_ptr)> error,
const Ice::Current& current)
{
- thread t(
+ std::thread t(
[x, y, response]()
{
try
@@ -137,7 +137,7 @@ MyObjectI::amdBadAddAsync(int,
function<void(exception_ptr)> error,
const Ice::Current&)
{
- thread t(
+ std::thread t(
[error]()
{
this_thread::sleep_for(chrono::milliseconds(10));
@@ -160,7 +160,7 @@ MyObjectI::amdNotExistAddAsync(int,
function<void(exception_ptr)> error,
const Ice::Current&)
{
- thread t(
+ std::thread t(
[error]()
{
this_thread::sleep_for(chrono::milliseconds(10));
@@ -183,7 +183,7 @@ MyObjectI::amdBadSystemAddAsync(int,
function<void(exception_ptr)> error,
const Ice::Current&)
{
- thread t(
+ std::thread t(
[error]()
{
this_thread::sleep_for(chrono::milliseconds(10));
diff --git a/cpp/test/Ice/operations/BatchOnewaysAMI.cpp b/cpp/test/Ice/operations/BatchOnewaysAMI.cpp
index 9684545a6ac..59de2c74fc3 100644
--- a/cpp/test/Ice/operations/BatchOnewaysAMI.cpp
+++ b/cpp/test/Ice/operations/BatchOnewaysAMI.cpp
@@ -8,7 +8,12 @@
using namespace std;
+// Work-around for anonymous namspace bug in xlclang++
+#ifdef __ibmxl__
+namespace BatchOnewaysAMINamespace
+#else
namespace
+#endif
{
class Callback : public IceUtil::Monitor<IceUtil::Mutex>, public IceUtil::Shared
@@ -85,6 +90,10 @@ public:
};
}
+#ifdef __ibmxl__
+using namespace BatchOnewaysAMINamespace;
+#endif
+
void
batchOnewaysAMI(const Test::MyClassPrxPtr& p)
{
diff --git a/cpp/test/Ice/operations/OnewaysAMI.cpp b/cpp/test/Ice/operations/OnewaysAMI.cpp
index bd3fc9241f7..2b73c141ee4 100644
--- a/cpp/test/Ice/operations/OnewaysAMI.cpp
+++ b/cpp/test/Ice/operations/OnewaysAMI.cpp
@@ -8,7 +8,12 @@
using namespace std;
+// Work-around for anonymous namspace bug in xlclang++
+#ifdef __ibmxl__
+namespace OnewaysAMINamespace
+#else
namespace
+#endif
{
class CallbackBase
@@ -75,6 +80,10 @@ ICE_DEFINE_PTR(CallbackPtr, Callback);
}
+#ifdef __ibmxl__
+using namespace OnewaysAMINamespace;
+#endif
+
void
onewaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrxPtr& proxy)
{
diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index e71852c300a..985a49034f5 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -22,7 +22,7 @@
#endif
using namespace std;
-using namespace Test;
+
namespace
{
@@ -157,8 +157,8 @@ public:
void opMyEnum(Test::MyEnum r, Test::MyEnum e)
{
- test(e == ICE_ENUM(Test::MyEnum, enum2));
- test(r == ICE_ENUM(Test::MyEnum, enum3));
+ test(e == Test::ICE_ENUM(MyEnum, enum2));
+ test(r == Test::ICE_ENUM(MyEnum, enum3));
called();
}
@@ -190,9 +190,9 @@ public:
void opStruct(const Test::Structure& rso, const Test::Structure& so)
{
test(rso.p == 0);
- test(rso.e == ICE_ENUM(Test::MyEnum, enum2));
+ test(rso.e == Test::ICE_ENUM(MyEnum, enum2));
test(rso.s.s == "def");
- test(so.e == ICE_ENUM(Test::MyEnum, enum3));
+ test(so.e == Test::ICE_ENUM(MyEnum, enum3));
test(so.s.s == "a new string");
//
@@ -497,18 +497,18 @@ public:
void opStringMyEnumD(const Test::StringMyEnumD& ro, const Test::StringMyEnumD& _do)
{
Test::StringMyEnumD di1;
- di1["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di1[""] = ICE_ENUM(Test::MyEnum, enum2);
+ di1["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[""] = Test::ICE_ENUM(MyEnum, enum2);
test(_do == di1);
test(ro.size() == 4);
test(ro.find("abc") != ro.end());
- test(ro.find("abc")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro.find("abc")->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro.find("qwerty") != ro.end());
- test(ro.find("qwerty")->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro.find("qwerty")->second == Test::ICE_ENUM(MyEnum, enum3));
test(ro.find("") != ro.end());
- test(ro.find("")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find("")->second == Test::ICE_ENUM(MyEnum, enum2));
test(ro.find("Hello!!") != ro.end());
- test(ro.find("Hello!!")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find("Hello!!")->second == Test::ICE_ENUM(MyEnum, enum2));
called();
}
@@ -517,20 +517,20 @@ public:
Test::MyStruct ms11 = { 1, 1 };
Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = Test::ICE_ENUM(MyEnum, enum2);
test(_do == di1);
Test::MyStruct ms22 = { 2, 2 };
Test::MyStruct ms23 = { 2, 3 };
test(ro.size() == 4);
test(ro.find(ms11) != ro.end());
- test(ro.find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro.find(ms11)->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro.find(ms12) != ro.end());
- test(ro.find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find(ms12)->second == Test::ICE_ENUM(MyEnum, enum2));
test(ro.find(ms22) != ro.end());
- test(ro.find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro.find(ms22)->second == Test::ICE_ENUM(MyEnum, enum3));
test(ro.find(ms23) != ro.end());
- test(ro.find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find(ms23)->second == Test::ICE_ENUM(MyEnum, enum2));
called();
}
@@ -675,32 +675,32 @@ public:
test(ro.size() == 2);
test(ro[0].size() == 3);
test(ro[0].find("abc") != ro[0].end());
- test(ro[0].find("abc")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[0].find("abc")->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro[0].find("qwerty") != ro[0].end());
- test(ro[0].find("qwerty")->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro[0].find("qwerty")->second == Test::ICE_ENUM(MyEnum, enum3));
test(ro[0].find("Hello!!") != ro[0].end());
- test(ro[0].find("Hello!!")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[0].find("Hello!!")->second == Test::ICE_ENUM(MyEnum, enum2));
test(ro[1].size() == 2);
test(ro[1].find("abc") != ro[1].end());
- test(ro[1].find("abc")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[1].find("abc")->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro[1].find("") != ro[1].end());
- test(ro[1].find("")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[1].find("")->second == Test::ICE_ENUM(MyEnum, enum2));
test(_do.size() == 3);
test(_do[0].size() == 1);
test(_do[0].find("Goodbye") != _do[0].end());
- test(_do[0].find("Goodbye")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[0].find("Goodbye")->second == Test::ICE_ENUM(MyEnum, enum1));
test(_do[1].size() == 2);
test(_do[1].find("abc") != _do[1].end());
- test(_do[1].find("abc")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[1].find("abc")->second == Test::ICE_ENUM(MyEnum, enum1));
test(_do[1].find("") != _do[1].end());
- test(_do[1].find("")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[1].find("")->second == Test::ICE_ENUM(MyEnum, enum2));
test(_do[2].size() == 3);
test(_do[2].find("abc") != _do[2].end());
- test(_do[2].find("abc")->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[2].find("abc")->second == Test::ICE_ENUM(MyEnum, enum1));
test(_do[2].find("qwerty") != _do[2].end());
- test(_do[2].find("qwerty")->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do[2].find("qwerty")->second == Test::ICE_ENUM(MyEnum, enum3));
test(_do[2].find("Hello!!") != _do[2].end());
- test(_do[2].find("Hello!!")->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[2].find("Hello!!")->second == Test::ICE_ENUM(MyEnum, enum2));
called();
}
@@ -708,25 +708,25 @@ public:
{
test(ro.size() == 2);
test(ro[0].size() == 2);
- test(ro[0].find(ICE_ENUM(Test::MyEnum, enum2)) != ro[0].end());
- test(ro[0].find(ICE_ENUM(Test::MyEnum, enum2))->second == "Hello!!");
- test(ro[0].find(ICE_ENUM(Test::MyEnum, enum3)) != ro[0].end());
- test(ro[0].find(ICE_ENUM(Test::MyEnum, enum3))->second == "qwerty");
+ test(ro[0].find(Test::ICE_ENUM(MyEnum, enum2)) != ro[0].end());
+ test(ro[0].find(Test::ICE_ENUM(MyEnum, enum2))->second == "Hello!!");
+ test(ro[0].find(Test::ICE_ENUM(MyEnum, enum3)) != ro[0].end());
+ test(ro[0].find(Test::ICE_ENUM(MyEnum, enum3))->second == "qwerty");
test(ro[1].size() == 1);
- test(ro[1].find(ICE_ENUM(Test::MyEnum, enum1)) != ro[1].end());
- test(ro[1].find(ICE_ENUM(Test::MyEnum, enum1))->second == "abc");
+ test(ro[1].find(Test::ICE_ENUM(MyEnum, enum1)) != ro[1].end());
+ test(ro[1].find(Test::ICE_ENUM(MyEnum, enum1))->second == "abc");
test(_do.size() == 3);
test(_do[0].size() == 1);
- test(_do[0].find(ICE_ENUM(Test::MyEnum, enum1)) != _do[0].end());
- test(_do[0].find(ICE_ENUM(Test::MyEnum, enum1))->second == "Goodbye");
+ test(_do[0].find(Test::ICE_ENUM(MyEnum, enum1)) != _do[0].end());
+ test(_do[0].find(Test::ICE_ENUM(MyEnum, enum1))->second == "Goodbye");
test(_do[1].size() == 1);
- test(_do[1].find(ICE_ENUM(Test::MyEnum, enum1)) != _do[1].end());
- test(_do[1].find(ICE_ENUM(Test::MyEnum, enum1))->second == "abc");
+ test(_do[1].find(Test::ICE_ENUM(MyEnum, enum1)) != _do[1].end());
+ test(_do[1].find(Test::ICE_ENUM(MyEnum, enum1))->second == "abc");
test(_do[2].size() == 2);
- test(_do[2].find(ICE_ENUM(Test::MyEnum, enum2)) != _do[2].end());
- test(_do[2].find(ICE_ENUM(Test::MyEnum, enum2))->second == "Hello!!");
- test(_do[2].find(ICE_ENUM(Test::MyEnum, enum3)) != _do[2].end());
- test(_do[2].find(ICE_ENUM(Test::MyEnum, enum3))->second == "qwerty");
+ test(_do[2].find(Test::ICE_ENUM(MyEnum, enum2)) != _do[2].end());
+ test(_do[2].find(Test::ICE_ENUM(MyEnum, enum2))->second == "Hello!!");
+ test(_do[2].find(Test::ICE_ENUM(MyEnum, enum3)) != _do[2].end());
+ test(_do[2].find(Test::ICE_ENUM(MyEnum, enum3))->second == "qwerty");
called();
}
@@ -740,32 +740,32 @@ public:
test(ro.size() == 2);
test(ro[0].size() == 3);
test(ro[0].find(ms11) != ro[0].end());
- test(ro[0].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[0].find(ms11)->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro[0].find(ms22) != ro[0].end());
- test(ro[0].find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro[0].find(ms22)->second == Test::ICE_ENUM(MyEnum, enum3));
test(ro[0].find(ms23) != ro[0].end());
- test(ro[0].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[0].find(ms23)->second == Test::ICE_ENUM(MyEnum, enum2));
test(ro[1].size() == 2);
test(ro[1].find(ms11) != ro[1].end());
- test(ro[1].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[1].find(ms11)->second == Test::ICE_ENUM(MyEnum, enum1));
test(ro[1].find(ms12) != ro[1].end());
- test(ro[1].find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[1].find(ms12)->second == Test::ICE_ENUM(MyEnum, enum2));
test(_do.size() == 3);
test(_do[0].size() == 1);
test(_do[0].find(ms23) != _do[0].end());
- test(_do[0].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do[0].find(ms23)->second == Test::ICE_ENUM(MyEnum, enum3));
test(_do[1].size() == 2);
test(_do[1].find(ms11) != _do[1].end());
- test(_do[1].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[1].find(ms11)->second == Test::ICE_ENUM(MyEnum, enum1));
test(_do[1].find(ms12) != _do[1].end());
- test(_do[1].find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[1].find(ms12)->second == Test::ICE_ENUM(MyEnum, enum2));
test(_do[2].size() == 3);
test(_do[2].find(ms11) != _do[2].end());
- test(_do[2].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[2].find(ms11)->second == Test::ICE_ENUM(MyEnum, enum1));
test(_do[2].find(ms22) != _do[2].end());
- test(_do[2].find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do[2].find(ms22)->second == Test::ICE_ENUM(MyEnum, enum3));
test(_do[2].find(ms23) != _do[2].end());
- test(_do[2].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[2].find(ms23)->second == Test::ICE_ENUM(MyEnum, enum2));
called();
}
@@ -958,24 +958,24 @@ public:
void opMyEnumMyEnumSD(const Test::MyEnumMyEnumSD& ro, const Test::MyEnumMyEnumSD& _do)
{
test(_do.size() == 1);
- test(_do.find(ICE_ENUM(Test::MyEnum, enum1)) != _do.end());
- test(_do.find(ICE_ENUM(Test::MyEnum, enum1))->second.size() == 2);
- test(_do.find(ICE_ENUM(Test::MyEnum, enum1))->second[0] == ICE_ENUM(Test::MyEnum, enum3));
- test(_do.find(ICE_ENUM(Test::MyEnum, enum1))->second[1] == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do.find(Test::ICE_ENUM(MyEnum, enum1)) != _do.end());
+ test(_do.find(Test::ICE_ENUM(MyEnum, enum1))->second.size() == 2);
+ test(_do.find(Test::ICE_ENUM(MyEnum, enum1))->second[0] == Test::ICE_ENUM(MyEnum, enum3));
+ test(_do.find(Test::ICE_ENUM(MyEnum, enum1))->second[1] == Test::ICE_ENUM(MyEnum, enum3));
test(ro.size() == 3);
- test(ro.find(ICE_ENUM(Test::MyEnum, enum3)) != ro.end());
- test(ro.find(ICE_ENUM(Test::MyEnum, enum3))->second.size() == 3);
- test(ro.find(ICE_ENUM(Test::MyEnum, enum3))->second[0] == ICE_ENUM(Test::MyEnum, enum1));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum3))->second[1] == ICE_ENUM(Test::MyEnum, enum1));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum3))->second[2] == ICE_ENUM(Test::MyEnum, enum2));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum2)) != ro.end());
- test(ro.find(ICE_ENUM(Test::MyEnum, enum2))->second.size() == 2);
- test(ro.find(ICE_ENUM(Test::MyEnum, enum2))->second[0] == ICE_ENUM(Test::MyEnum, enum1));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum2))->second[1] == ICE_ENUM(Test::MyEnum, enum2));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum1)) != ro.end());
- test(ro.find(ICE_ENUM(Test::MyEnum, enum1))->second.size() == 2);
- test(ro.find(ICE_ENUM(Test::MyEnum, enum1))->second[0] == ICE_ENUM(Test::MyEnum, enum3));
- test(ro.find(ICE_ENUM(Test::MyEnum, enum1))->second[1] == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum3)) != ro.end());
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum3))->second.size() == 3);
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum3))->second[0] == Test::ICE_ENUM(MyEnum, enum1));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum3))->second[1] == Test::ICE_ENUM(MyEnum, enum1));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum3))->second[2] == Test::ICE_ENUM(MyEnum, enum2));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum2)) != ro.end());
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum2))->second.size() == 2);
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum2))->second[0] == Test::ICE_ENUM(MyEnum, enum1));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum2))->second[1] == Test::ICE_ENUM(MyEnum, enum2));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum1)) != ro.end());
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum1))->second.size() == 2);
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum1))->second[0] == Test::ICE_ENUM(MyEnum, enum3));
+ test(ro.find(Test::ICE_ENUM(MyEnum, enum1))->second[1] == Test::ICE_ENUM(MyEnum, enum3));
called();
}
@@ -1237,8 +1237,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
- p->opMyEnumAsync(MyEnum::enum2,
- [&](MyEnum e1, MyEnum e2)
+ p->opMyEnumAsync(Test::MyEnum::enum2,
+ [&](Test::MyEnum e1, Test::MyEnum e2)
{
cb->opMyEnum(e1, e2);
},
@@ -1256,7 +1256,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
CallbackPtr cb = ICE_MAKE_SHARED(Callback, communicator);
#ifdef ICE_CPP11_MAPPING
p->opMyClassAsync(p,
- [&](shared_ptr<MyClassPrx> c1, shared_ptr<MyClassPrx> c2, shared_ptr<MyClassPrx> c3)
+ [&](shared_ptr<Test::MyClassPrx> c1, shared_ptr<Test::MyClassPrx> c2, shared_ptr<Test::MyClassPrx> c3)
{
cb->opMyClass(move(c1), move(c2), move(c3));
},
@@ -1273,11 +1273,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
Test::Structure si1;
si1.p = p;
- si1.e = ICE_ENUM(Test::MyEnum, enum3);
+ si1.e = Test::ICE_ENUM(MyEnum, enum3);
si1.s.s = "abc";
Test::Structure si2;
si2.p = 0;
- si2.e = ICE_ENUM(Test::MyEnum, enum2);
+ si2.e = Test::ICE_ENUM(MyEnum, enum2);
si2.s.s = "def";
CallbackPtr cb = ICE_MAKE_SHARED(Callback, communicator);
@@ -1700,12 +1700,12 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
Test::StringMyEnumD di1;
- di1["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di1[""] = ICE_ENUM(Test::MyEnum, enum2);
+ di1["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[""] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di2;
- di2["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di2["qwerty"] = ICE_ENUM(Test::MyEnum, enum3);
- di2["Hello!!"] = ICE_ENUM(Test::MyEnum, enum2);
+ di2["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di2["qwerty"] = Test::ICE_ENUM(MyEnum, enum3);
+ di2["Hello!!"] = Test::ICE_ENUM(MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
@@ -1727,15 +1727,15 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStruct ms11 = { 1, 1 };
Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStruct ms22 = { 2, 2 };
Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = Test::ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = Test::ICE_ENUM(MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
@@ -1906,14 +1906,14 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
dsi2.resize(1);
Test::StringMyEnumD di1;
- di1["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di1[""] = ICE_ENUM(Test::MyEnum, enum2);
+ di1["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[""] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di2;
- di2["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di2["qwerty"] = ICE_ENUM(Test::MyEnum, enum3);
- di2["Hello!!"] = ICE_ENUM(Test::MyEnum, enum2);
+ di2["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di2["qwerty"] = Test::ICE_ENUM(MyEnum, enum3);
+ di2["Hello!!"] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di3;
- di3["Goodbye"] = ICE_ENUM(Test::MyEnum, enum1);
+ di3["Goodbye"] = Test::ICE_ENUM(MyEnum, enum1);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -1942,12 +1942,12 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
dsi2.resize(1);
Test::MyEnumStringD di1;
- di1[ICE_ENUM(Test::MyEnum, enum1)] = "abc";
+ di1[Test::ICE_ENUM(MyEnum, enum1)] = "abc";
Test::MyEnumStringD di2;
- di2[ICE_ENUM(Test::MyEnum, enum2)] = "Hello!!";
- di2[ICE_ENUM(Test::MyEnum, enum3)] = "qwerty";
+ di2[Test::ICE_ENUM(MyEnum, enum2)] = "Hello!!";
+ di2[Test::ICE_ENUM(MyEnum, enum3)] = "qwerty";
Test::MyEnumStringD di3;
- di3[ICE_ENUM(Test::MyEnum, enum1)] = "Goodbye";
+ di3[Test::ICE_ENUM(MyEnum, enum1)] = "Goodbye";
dsi1[0] = di1;
dsi1[1] = di2;
@@ -1978,18 +1978,18 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStruct ms11 = { 1, 1 };
Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStruct ms22 = { 2, 2 };
Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = Test::ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStructMyEnumD di3;
- di3[ms23] = ICE_ENUM(Test::MyEnum, enum3);
+ di3[ms23] = Test::ICE_ENUM(MyEnum, enum3);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -1998,7 +1998,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
p->opMyStructMyEnumDSAsync(dsi1, dsi2,
- [&](Test::MyStructMyEnumDS dsi3, MyStructMyEnumDS dsi4)
+ [&](Test::MyStructMyEnumDS dsi3, Test::MyStructMyEnumDS dsi4)
{
cb->opMyStructMyEnumDS(move(dsi3), move(dsi4));
},
@@ -2304,17 +2304,17 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyEnumS si2;
Test::MyEnumS si3;
- si1.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si1.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si1.push_back(ICE_ENUM(Test::MyEnum, enum2));
- si2.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si2.push_back(ICE_ENUM(Test::MyEnum, enum2));
- si3.push_back(ICE_ENUM(Test::MyEnum, enum3));
- si3.push_back(ICE_ENUM(Test::MyEnum, enum3));
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum2));
+ si2.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si2.push_back(Test::ICE_ENUM(MyEnum, enum2));
+ si3.push_back(Test::ICE_ENUM(MyEnum, enum3));
+ si3.push_back(Test::ICE_ENUM(MyEnum, enum3));
- sdi1[ICE_ENUM(Test::MyEnum, enum3)] = si1;
- sdi1[ICE_ENUM(Test::MyEnum, enum2)] = si2;
- sdi2[ICE_ENUM(Test::MyEnum, enum1)] = si3;
+ sdi1[Test::ICE_ENUM(MyEnum, enum3)] = si1;
+ sdi1[Test::ICE_ENUM(MyEnum, enum2)] = si2;
+ sdi2[Test::ICE_ENUM(MyEnum, enum1)] = si3;
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
@@ -2475,7 +2475,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Ice::PropertiesPtr properties = ic->getProperties();
Test::MyClassPrxPtr q =
ICE_UNCHECKED_CAST(Test::MyClassPrx,
- ic->stringToProxy("test:" + TestHelper::getTestEndpoint(properties)));
+ ic->stringToProxy("test:" + Test::TestHelper::getTestEndpoint(properties)));
ic->getImplicitContext()->setContext(ctx);
test(ic->getImplicitContext()->getContext() == ctx);
{
@@ -2894,11 +2894,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
Test::Structure si1;
si1.p = p;
- si1.e = ICE_ENUM(Test::MyEnum, enum3);
+ si1.e = Test::ICE_ENUM(MyEnum, enum3);
si1.s.s = "abc";
Test::Structure si2;
si2.p = 0;
- si2.e = ICE_ENUM(Test::MyEnum, enum2);
+ si2.e = Test::ICE_ENUM(MyEnum, enum2);
si2.s.s = "def";
CallbackPtr cb = ICE_MAKE_SHARED(Callback, communicator);
@@ -3276,12 +3276,12 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
Test::StringMyEnumD di1;
- di1["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di1[""] = ICE_ENUM(Test::MyEnum, enum2);
+ di1["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[""] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di2;
- di2["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di2["qwerty"] = ICE_ENUM(Test::MyEnum, enum3);
- di2["Hello!!"] = ICE_ENUM(Test::MyEnum, enum2);
+ di2["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di2["qwerty"] = Test::ICE_ENUM(MyEnum, enum3);
+ di2["Hello!!"] = Test::ICE_ENUM(MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
auto f = p->opStringMyEnumDAsync(di1, di2);
@@ -3305,15 +3305,15 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStruct ms11 = { 1, 1 };
Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStruct ms22 = { 2, 2 };
Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = Test::ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = Test::ICE_ENUM(MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
auto f = p->opMyStructMyEnumDAsync(di1, di2);
@@ -3493,14 +3493,14 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
dsi2.resize(1);
Test::StringMyEnumD di1;
- di1["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di1[""] = ICE_ENUM(Test::MyEnum, enum2);
+ di1["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[""] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di2;
- di2["abc"] = ICE_ENUM(Test::MyEnum, enum1);
- di2["qwerty"] = ICE_ENUM(Test::MyEnum, enum3);
- di2["Hello!!"] = ICE_ENUM(Test::MyEnum, enum2);
+ di2["abc"] = Test::ICE_ENUM(MyEnum, enum1);
+ di2["qwerty"] = Test::ICE_ENUM(MyEnum, enum3);
+ di2["Hello!!"] = Test::ICE_ENUM(MyEnum, enum2);
Test::StringMyEnumD di3;
- di3["Goodbye"] = ICE_ENUM(Test::MyEnum, enum1);
+ di3["Goodbye"] = Test::ICE_ENUM(MyEnum, enum1);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -3531,12 +3531,12 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
dsi2.resize(1);
Test::MyEnumStringD di1;
- di1[ICE_ENUM(Test::MyEnum, enum1)] = "abc";
+ di1[Test::ICE_ENUM(MyEnum, enum1)] = "abc";
Test::MyEnumStringD di2;
- di2[ICE_ENUM(Test::MyEnum, enum2)] = "Hello!!";
- di2[ICE_ENUM(Test::MyEnum, enum3)] = "qwerty";
+ di2[Test::ICE_ENUM(MyEnum, enum2)] = "Hello!!";
+ di2[Test::ICE_ENUM(MyEnum, enum3)] = "qwerty";
Test::MyEnumStringD di3;
- di3[ICE_ENUM(Test::MyEnum, enum1)] = "Goodbye";
+ di3[Test::ICE_ENUM(MyEnum, enum1)] = "Goodbye";
dsi1[0] = di1;
dsi1[1] = di2;
@@ -3569,18 +3569,18 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStruct ms11 = { 1, 1 };
Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStruct ms22 = { 2, 2 };
Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = Test::ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = Test::ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = Test::ICE_ENUM(MyEnum, enum2);
Test::MyStructMyEnumD di3;
- di3[ms23] = ICE_ENUM(Test::MyEnum, enum3);
+ di3[ms23] = Test::ICE_ENUM(MyEnum, enum3);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -3914,17 +3914,17 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyEnumS si2;
Test::MyEnumS si3;
- si1.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si1.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si1.push_back(ICE_ENUM(Test::MyEnum, enum2));
- si2.push_back(ICE_ENUM(Test::MyEnum, enum1));
- si2.push_back(ICE_ENUM(Test::MyEnum, enum2));
- si3.push_back(ICE_ENUM(Test::MyEnum, enum3));
- si3.push_back(ICE_ENUM(Test::MyEnum, enum3));
-
- sdi1[ICE_ENUM(Test::MyEnum, enum3)] = si1;
- sdi1[ICE_ENUM(Test::MyEnum, enum2)] = si2;
- sdi2[ICE_ENUM(Test::MyEnum, enum1)] = si3;
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si1.push_back(Test::ICE_ENUM(MyEnum, enum2));
+ si2.push_back(Test::ICE_ENUM(MyEnum, enum1));
+ si2.push_back(Test::ICE_ENUM(MyEnum, enum2));
+ si3.push_back(Test::ICE_ENUM(MyEnum, enum3));
+ si3.push_back(Test::ICE_ENUM(MyEnum, enum3));
+
+ sdi1[Test::ICE_ENUM(MyEnum, enum3)] = si1;
+ sdi1[Test::ICE_ENUM(MyEnum, enum2)] = si2;
+ sdi2[Test::ICE_ENUM(MyEnum, enum1)] = si3;
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
auto f = p->opMyEnumMyEnumSDAsync(sdi1, sdi2);
diff --git a/cpp/test/Ice/stringConverter/Client.cpp b/cpp/test/Ice/stringConverter/Client.cpp
index bc746df14ca..e32b6e51dbe 100644
--- a/cpp/test/Ice/stringConverter/Client.cpp
+++ b/cpp/test/Ice/stringConverter/Client.cpp
@@ -55,7 +55,7 @@ Client::run(int argc, char** argv)
narrowEncoding = "iso815";
wideEncoding = "ucs4";
-#elif defined(_AIX)
+#elif defined(_AIX) && !defined(_LIBICONV_VERSION)
// Always big-endian
narrowEncoding = "ISO8859-15";
diff --git a/cpp/test/Ice/stringConverter/Makefile.mk b/cpp/test/Ice/stringConverter/Makefile.mk
index 22c6a4d2ef0..3ca7713a6b9 100644
--- a/cpp/test/Ice/stringConverter/Makefile.mk
+++ b/cpp/test/Ice/stringConverter/Makefile.mk
@@ -2,6 +2,6 @@
# Copyright (c) ZeroC, Inc. All rights reserved.
#
-$(test)_ldflags = $(iconv_ldflags)
+$(test)_libs = iconv
tests += $(test)
diff --git a/cpp/test/Ice/udp/AllTests.cpp b/cpp/test/Ice/udp/AllTests.cpp
index c7c8dc1ce1d..ba11d63ff8b 100644
--- a/cpp/test/Ice/udp/AllTests.cpp
+++ b/cpp/test/Ice/udp/AllTests.cpp
@@ -154,7 +154,22 @@ allTests(Test::TestHelper* helper)
while(nRetry-- > 0)
{
replyI->reset();
- objMcast->ping(reply);
+ try
+ {
+ objMcast->ping(reply);
+ }
+ catch(const Ice::SocketException&)
+ {
+ // Multicast IPv6 not supported on the platform. This occurs for example
+ // on AIX PVP clould VMs.
+ if(communicator->getProperties()->getProperty("Ice.IPv6") == "1")
+ {
+ cout << "(not supported) ";
+ ret = 5;
+ break;
+ }
+ throw;
+ }
ret = replyI->waitReply(5, IceUtil::Time::seconds(2));
if(ret)
{
@@ -175,7 +190,6 @@ allTests(Test::TestHelper* helper)
cout << "testing udp bi-dir connection... " << flush;
obj->ice_getConnection()->setAdapter(adapter);
- objMcast->ice_getConnection()->setAdapter(adapter);
nRetry = 5;
while(nRetry-- > 0)
{
@@ -205,6 +219,7 @@ allTests(Test::TestHelper* helper)
//
// cout << "testing udp bi-dir connection... " << flush;
// nRetry = 5;
+// objMcast->ice_getConnection()->setAdapter(adapter);
// while(nRetry-- > 0)
// {
// replyI->reset();
diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp
index 34113776aba..17a8427ef46 100644
--- a/cpp/test/Ice/udp/Server.cpp
+++ b/cpp/test/Ice/udp/Server.cpp
@@ -56,10 +56,26 @@ Server::run(int argc, char** argv)
#endif
}
communicator->getProperties()->setProperty("McastTestAdapter.Endpoints", endpoint.str());
- Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter");
- mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test"));
- mcastAdapter->activate();
+ try
+ {
+ Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter");
+ mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test"));
+ mcastAdapter->activate();
+ }
+ catch(const Ice::SocketException&)
+ {
+ // Multicast IPv6 not supported on the platform. This occurs for example
+ // on AIX PVP clould VMs.
+ if(communicator->getProperties()->getProperty("Ice.IPv6") == "1")
+ {
+ cout << "McastTestAdapter ready" << endl;
+ }
+ else
+ {
+ throw;
+ }
+ }
serverReady();
communicator->waitForShutdown();
diff --git a/cpp/test/IceGrid/fileLock/test.py b/cpp/test/IceGrid/fileLock/test.py
index 3a0cd85cbec..11055392cad 100644
--- a/cpp/test/IceGrid/fileLock/test.py
+++ b/cpp/test/IceGrid/fileLock/test.py
@@ -8,7 +8,7 @@ class IceGridAdminTestCase(IceGridTestCase):
def runClientSide(self, current):
sys.stdout.write("testing IceGrid file lock... ")
- registry = IceGridRegistryMaster(portnum=25, readyCount=0, quiet=True);
+ registry = IceGridRegistryMaster(portnum=25, ready="", quiet=True);
registry.start(current)
registry.expect(current, ".*IceUtil::FileLockException.*")
registry.stop(current, False)
diff --git a/cpp/test/IceGrid/session/AllTests.cpp b/cpp/test/IceGrid/session/AllTests.cpp
index 256236e8dd0..d265c5284a0 100644
--- a/cpp/test/IceGrid/session/AllTests.cpp
+++ b/cpp/test/IceGrid/session/AllTests.cpp
@@ -480,6 +480,10 @@ testFailedAndPrintObservers(const char* expr, const char* file, unsigned int lin
#undef test
#define test(ex) ((ex) ? ((void)0) : testFailedAndPrintObservers(#ex, __FILE__, __LINE__))
+#if defined(_AIX) && defined(__GNUC__) && !defined(__ibmxl__)
+// Strange optimization bug with catching ExtendedPermissionDeniedException with GCC 8.1 on AIX
+__attribute__((optimize("O0")))
+#endif
void
allTests(Test::TestHelper* helper)
{
diff --git a/cpp/test/IceStorm/single/test.py b/cpp/test/IceStorm/single/test.py
index a225315302f..9e4500ac08c 100644
--- a/cpp/test/IceStorm/single/test.py
+++ b/cpp/test/IceStorm/single/test.py
@@ -6,16 +6,16 @@
#
# Make sure the subscriber uses a larger size receive buffer size then
# the IceStorm send buffer size. This ensures the test works with bogus
-# OS configurations where the reicever buffer size is smaller than the
+# OS configurations where the receiver buffer size is smaller than the
# send buffer size (causing the received messages to be truncated). See
# bug #6070 and #7558.
#
-props = { "Ice.UDP.SndSize" : 2048 * 1024, "Ice.Warn.Dispatch" : 0 }
+props = { "Ice.UDP.SndSize" : 512 * 1024, "Ice.Warn.Dispatch" : 0 }
persistent = IceStorm(props = props)
transient = IceStorm(props = props, transient=True)
replicated = [ IceStorm(replica=i, nreplicas=3, props = props) for i in range(0,3) ]
-sub = Subscriber(args=["{testcase.parent.name}"], props = { "Ice.UDP.RcvSize" : 4096 * 1024 }, readyCount=3)
+sub = Subscriber(args=["{testcase.parent.name}"], props = { "Ice.UDP.RcvSize" : 1024 * 1024 }, readyCount=3)
pub = Publisher(args=["{testcase.parent.name}"])
class IceStormSingleTestCase(IceStormTestCase):
diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp
index 8e09ef3618e..e40ad062532 100644
--- a/cpp/test/IceUtil/unicode/Client.cpp
+++ b/cpp/test/IceUtil/unicode/Client.cpp
@@ -187,8 +187,12 @@ main(int argc, char* argv[])
//
// Euro sign (U+20AC) is encoded with 1 UTF-16 code unit, and 3 UTF-8 code units
// U+10437 is a Deseret character, encoded with 2 UTF-16 code units, and 4 UTF-8 code units
- //
+ // xlC in 32-bit mode truncates U+10437 into a single UTF-16 character
+#if defined(__IBMCPP__) && !defined(__64BIT__)
+ wstring ws = L"\u20ac\u20ac\ud801\udc37";
+#else
wstring ws = L"\u20ac\u20ac\U00010437";
+#endif
if(sizeof(wchar_t) == 2)
{
diff --git a/cpp/test/Slice/headers/test.py b/cpp/test/Slice/headers/test.py
index 2ded9c53337..7b66e895638 100644
--- a/cpp/test/Slice/headers/test.py
+++ b/cpp/test/Slice/headers/test.py
@@ -93,7 +93,7 @@ class SliceHeadersTestCase(ClientTestCase):
os.system("mkdir -p tmp/Ice-x.y.z/slice/Ice")
os.system("cd tmp && ln -s Ice-x.y.z Ice-x.y")
f = open("tmp/Ice-x.y.z/slice/Ice/Identity.ice", "w")
- f.write("// dumy file")
+ f.write("// dummy file")
os.system("mkdir -p project1")
f = open("project1/A.ice", "w")
@@ -108,23 +108,24 @@ class SliceHeadersTestCase(ClientTestCase):
#
# symlink directory with extra / at end
+ # (the symlink with / at the end fails on AIX)
#
- #
- os.system("mkdir -p tmp/Ice-x.y.z/slice/Ice")
- os.system("mkdir -p tmp/Ice")
- os.system("cd tmp/Ice && ln -s ../Ice-x.y.z/slice/ .")
- f = open("tmp/Ice-x.y.z/slice/Ice/Identity.ice", "w")
- f.write("// dumy file")
- f.close()
- os.system("mkdir -p project1")
- f = open("project1/A.ice", "w")
- f.write("#include <Ice/Identity.ice>")
- f.close()
- os.system("cd project1 && %s -I%s/tmp/Ice/slice A.ice" % (slice2cpp, basedir))
- f = open("project1/A.h")
- if not re.search(re.escape('#include <Ice/Identity.h>'), f.read()):
- raise RuntimeError("failed!")
- self.clean()
+ if not isinstance(platform, AIX):
+ os.system("mkdir -p tmp/Ice-x.y.z/slice/Ice")
+ os.system("mkdir -p tmp/Ice")
+ os.system("cd tmp/Ice && ln -s ../Ice-x.y.z/slice/ .")
+ f = open("tmp/Ice-x.y.z/slice/Ice/Identity.ice", "w")
+ f.write("// dummy file")
+ f.close()
+ os.system("mkdir -p project1")
+ f = open("project1/A.ice", "w")
+ f.write("#include <Ice/Identity.ice>")
+ f.close()
+ os.system("cd project1 && %s -I%s/tmp/Ice/slice A.ice" % (slice2cpp, basedir))
+ f = open("project1/A.h")
+ if not re.search(re.escape('#include <Ice/Identity.h>'), f.read()):
+ raise RuntimeError("failed!")
+ self.clean()
current.writeln("ok")
diff --git a/cpp/test/Slice/parser/Makefile.mk b/cpp/test/Slice/parser/Makefile.mk
index c46cfbb48ab..38686ff72f5 100644
--- a/cpp/test/Slice/parser/Makefile.mk
+++ b/cpp/test/Slice/parser/Makefile.mk
@@ -3,7 +3,6 @@
#
$(test)_libraries := SliceParser
-
-$(test)_sliceflags := -I$(test)
+$(test)_sliceflags := -I$(test)
tests += $(test)