build: Always build in C++11 mode.
This commit also includes update of websocketpp submodule, as the
previous version has compilation problems on OSX with XCode 6.1
Change-Id: I8c9670d0026d840838d77e610e50679ee5ede7a5
Refs: #1930, #2082
diff --git a/tests/daemon/face/tcp.cpp b/tests/daemon/face/tcp.cpp
index 7b0a77d..a87c5dc 100644
--- a/tests/daemon/face/tcp.cpp
+++ b/tests/daemon/face/tcp.cpp
@@ -234,6 +234,16 @@
BOOST_CHECK_EQUAL(faces.size(), shouldBe);
}
+ void
+ connect(const shared_ptr<TcpChannel>& channel,
+ const std::string& remoteHost,
+ const std::string& remotePort)
+ {
+ channel->connect(remoteHost, remotePort,
+ bind(&EndToEndFixture::channel_onFaceCreated, this, _1),
+ bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
+ }
+
public:
LimitedIo limitedIo;
@@ -431,13 +441,7 @@
BOOST_CHECK_NE(channel3, channel4);
scheduler::schedule(time::seconds(1),
- bind(&TcpChannel::connect, channel4, "127.0.0.1", "20070",
- // does not work without static_cast
- static_cast<TcpChannel::FaceCreatedCallback>(
- bind(&EndToEndFixture::channel_onFaceCreated, this, _1)),
- static_cast<TcpChannel::ConnectFailedCallback>(
- bind(&EndToEndFixture::channel_onConnectFailed, this, _1)),
- time::seconds(4)));
+ bind(&EndToEndFixture::connect, this, channel4, "127.0.0.1", "20070"));
scheduler::schedule(time::milliseconds(500),
bind(&EndToEndFixture::checkFaceList, this, 4));
diff --git a/tests/daemon/face/udp.cpp b/tests/daemon/face/udp.cpp
index 503ec74..87ee8f0 100644
--- a/tests/daemon/face/udp.cpp
+++ b/tests/daemon/face/udp.cpp
@@ -379,7 +379,7 @@
void
channel_onConnectFailedOk(const std::string& reason)
{
- //it's ok, it was supposed to fail
+ // it's ok, it was supposed to fail
limitedIo.afterOp();
}
@@ -389,6 +389,16 @@
BOOST_CHECK_EQUAL(faces.size(), shouldBe);
}
+ void
+ connect(const shared_ptr<UdpChannel>& channel,
+ const std::string& remoteHost,
+ const std::string& remotePort)
+ {
+ channel->connect(remoteHost, remotePort,
+ bind(&EndToEndFixture::channel_onFaceCreated, this, _1),
+ bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
+ }
+
public:
LimitedIo limitedIo;
@@ -640,12 +650,7 @@
BOOST_CHECK_NE(channel3, channel4);
scheduler::schedule(time::milliseconds(500),
- bind(&UdpChannel::connect, channel4, "127.0.0.1", "20070",
- // does not work without static_cast
- static_cast<UdpChannel::FaceCreatedCallback>(
- bind(&EndToEndFixture::channel_onFaceCreated, this, _1)),
- static_cast<UdpChannel::ConnectFailedCallback>(
- bind(&EndToEndFixture::channel_onConnectFailed, this, _1))));
+ bind(&EndToEndFixture::connect, this, channel4, "127.0.0.1", "20070"));
scheduler::schedule(time::milliseconds(400), bind(&EndToEndFixture::checkFaceList, this, 2));
diff --git a/tests/daemon/mgmt/command-validator.cpp b/tests/daemon/mgmt/command-validator.cpp
index 5e1dd30..ac32a6e 100644
--- a/tests/daemon/mgmt/command-validator.cpp
+++ b/tests/daemon/mgmt/command-validator.cpp
@@ -230,21 +230,21 @@
config.parse(CONFIG, false, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester2, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2));
BOOST_REQUIRE(m_tester2.commandValidated());
m_tester2.resetValidation();
@@ -254,8 +254,8 @@
generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
validator.validate(*unauthorizedFibCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester2, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
}
@@ -290,21 +290,21 @@
config.parse(CONFIG, true, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester2, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
m_tester2.resetValidation();
@@ -314,8 +314,8 @@
generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
validator.validate(*unauthorizedFibCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester2, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester2, _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
}
@@ -629,22 +629,22 @@
config.parse(WILDCARD_CERT_CONFIG, false, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, &m_tester1, _1),
+ bind(&CommandValidatorTester::onValidationFailed, &m_tester1, _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();
diff --git a/tests/daemon/mgmt/manager-base.cpp b/tests/daemon/mgmt/manager-base.cpp
index 58a6fd4..5d2b6c3 100644
--- a/tests/daemon/mgmt/manager-base.cpp
+++ b/tests/daemon/mgmt/manager-base.cpp
@@ -80,7 +80,7 @@
shared_ptr<InternalFace>
getInternalFace()
{
- return ndn::ptr_lib::static_pointer_cast<InternalFace>(m_face);
+ return static_pointer_cast<InternalFace>(m_face);
}
void