summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-31 00:14:27 +0100
committerJose <jose@zeroc.com>2015-12-31 00:14:27 +0100
commit52d50fe96e73339b93efd5f54146d2fd01ca831d (patch)
treee8bb98b896c93943ba19fa8463ae54b406922096 /cpp/test
parentC++ invoke test fixes (diff)
downloadice-52d50fe96e73339b93efd5f54146d2fd01ca831d.tar.bz2
ice-52d50fe96e73339b93efd5f54146d2fd01ca831d.tar.xz
ice-52d50fe96e73339b93efd5f54146d2fd01ca831d.zip
C++11 updates for IceLocatorDiscovery
- Fixes IceLocatorDiscovery to build with new C++11 mapping - Fixes to C++11 mapping for Bloject and ice_invoke async versions
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/invoke/AllTests.cpp4
-rw-r--r--cpp/test/Ice/invoke/BlobjectI.cpp10
-rw-r--r--cpp/test/Ice/invoke/BlobjectI.h6
-rw-r--r--cpp/test/Makefile3
-rw-r--r--cpp/test/Makefile.mak3
5 files changed, 16 insertions, 10 deletions
diff --git a/cpp/test/Ice/invoke/AllTests.cpp b/cpp/test/Ice/invoke/AllTests.cpp
index 0386e04fc84..5b4f559067a 100644
--- a/cpp/test/Ice/invoke/AllTests.cpp
+++ b/cpp/test/Ice/invoke/AllTests.cpp
@@ -448,9 +448,9 @@ allTests(const Ice::CommunicatorPtr& communicator)
pair<const ::Ice::Byte*, const ::Ice::Byte*> inPair(&inEncaps[0], &inEncaps[0] + inEncaps.size());
cl->ice_invoke_async("opString", OperationMode::Normal, inPair,
- [&](bool ok, vector<Ice::Byte> outParams)
+ [&](bool ok, pair<const Ice::Byte*, const Ice::Byte*> outParams)
{
- outEncaps = move(outParams);
+ vector<Ice::Byte>(outParams.first, outParams.second).swap(outEncaps);
completed.set_value(ok);
},
[&](exception_ptr ex)
diff --git a/cpp/test/Ice/invoke/BlobjectI.cpp b/cpp/test/Ice/invoke/BlobjectI.cpp
index 68e18223365..6ec24555023 100644
--- a/cpp/test/Ice/invoke/BlobjectI.cpp
+++ b/cpp/test/Ice/invoke/BlobjectI.cpp
@@ -97,18 +97,20 @@ BlobjectArrayI::ice_invoke(const pair<const Ice::Byte*, const Ice::Byte*>& inEnc
#ifdef ICE_CPP11_MAPPING
void
BlobjectAsyncI::ice_invoke_async(vector<Ice::Byte> inEncaps,
- function<void (bool, const vector<Ice::Byte>&)> response,
+ function<void (bool, vector<Ice::Byte>)> response,
+ function<void (exception_ptr)>,
const Ice::Current& current)
{
Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inEncaps);
vector<Ice::Byte> outEncaps;
bool ok = invokeInternal(in, outEncaps, current);
- response(ok, outEncaps);
+ response(ok, move(outEncaps));
}
void
BlobjectArrayAsyncI::ice_invoke_async(pair<const Ice::Byte*, const Ice::Byte*> inEncaps,
- function<void (bool, const pair<const Ice::Byte*, const Ice::Byte*>&)> response,
+ function<void (bool, pair<const Ice::Byte*, const Ice::Byte*>)> response,
+ function<void (exception_ptr)>,
const Ice::Current& current)
{
Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inEncaps);
@@ -124,7 +126,7 @@ BlobjectArrayAsyncI::ice_invoke_async(pair<const Ice::Byte*, const Ice::Byte*> i
outPair.first = &outEncaps[0];
outPair.second = &outEncaps[0] + outEncaps.size();
}
- response(ok, outPair);
+ response(ok, move(outPair));
}
#else
void
diff --git a/cpp/test/Ice/invoke/BlobjectI.h b/cpp/test/Ice/invoke/BlobjectI.h
index 5e2d384be37..8ba548e5b14 100644
--- a/cpp/test/Ice/invoke/BlobjectI.h
+++ b/cpp/test/Ice/invoke/BlobjectI.h
@@ -33,7 +33,8 @@ class BlobjectAsyncI : public Ice::BlobjectAsync
public:
virtual void ice_invoke_async(std::vector<Ice::Byte>,
- std::function<void (bool, const std::vector<Ice::Byte>&)>,
+ std::function<void (bool, std::vector<Ice::Byte>)>,
+ std::function<void (std::exception_ptr)>,
const Ice::Current&);
};
@@ -42,7 +43,8 @@ class BlobjectArrayAsyncI : public Ice::BlobjectArrayAsync
public:
virtual void ice_invoke_async(std::pair<const Ice::Byte*, const Ice::Byte*>,
- std::function<void (bool, const std::pair<const Ice::Byte*, const Ice::Byte*>&)>,
+ std::function<void (bool, std::pair<const Ice::Byte*, const Ice::Byte*>)>,
+ std::function<void (std::exception_ptr)>,
const Ice::Current&);
};
#else
diff --git a/cpp/test/Makefile b/cpp/test/Makefile
index 019710e9164..c7d629810ff 100644
--- a/cpp/test/Makefile
+++ b/cpp/test/Makefile
@@ -15,7 +15,8 @@ ifeq ($(CPP11_MAPPING),yes)
SUBDIRS = Common \
IceUtil \
Slice \
- Ice
+ Ice \
+ IceDiscovery
else
SUBDIRS = Common \
diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak
index ace4d3a2953..f4d7534085d 100644
--- a/cpp/test/Makefile.mak
+++ b/cpp/test/Makefile.mak
@@ -19,7 +19,8 @@ SUBDIRS = Common \
!elseif "$(CPP11_MAPPING)" == "yes"
SUBDIRS = IceUtil \
Slice \
- Ice
+ Ice \
+ IceDiscovery
!elseif "$(CPP_COMPILER)" == "VC100"
SUBDIRS = IceUtil \
Slice \