nlsr: Don't use ndn aliases provided by ndn-cxx/common.hpp
refs: #3983
Change-Id: I31da8d68e0285dcfe9c7d3e5e678c00397d22bef
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index 4466b9b..477d7a7 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -19,6 +19,9 @@
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
+#ifndef NLSR_PUBLISHER_FIXTURE_HPP
+#define NLSR_PUBLISHER_FIXTURE_HPP
+
#include "nlsr.hpp"
#include "../boost-test.hpp"
@@ -33,8 +36,8 @@
{
public:
PublisherFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>())
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, lsdb(nlsr, g_scheduler, nlsr.getSyncLogicHandler())
{
}
@@ -134,7 +137,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
Lsdb lsdb;
ndn::KeyChain keyChain;
@@ -142,3 +145,5 @@
} // namespace test
} // namespace nlsr
+
+#endif // NLSR_PUBLISHER_FIXTURE_HPP
diff --git a/tests/publisher/test-lsdb-dataset-interest-handler.cpp b/tests/publisher/test-lsdb-dataset-interest-handler.cpp
index 6a2c690..8e9855a 100644
--- a/tests/publisher/test-lsdb-dataset-interest-handler.cpp
+++ b/tests/publisher/test-lsdb-dataset-interest-handler.cpp
@@ -31,7 +31,7 @@
namespace test {
void
-processDatasetInterest(shared_ptr<ndn::util::DummyClientFace> face,
+processDatasetInterest(std::shared_ptr<ndn::util::DummyClientFace> face,
std::function<bool(const ndn::Block&)> isSameType)
{
face->processEvents(ndn::time::milliseconds(1));
@@ -50,7 +50,7 @@
}
void
-checkErrorResponse(shared_ptr<ndn::util::DummyClientFace> face, uint64_t expectedCode)
+checkErrorResponse(std::shared_ptr<ndn::util::DummyClientFace> face, uint64_t expectedCode)
{
BOOST_REQUIRE_EQUAL(face->sentData.size(), 1);
diff --git a/tests/publisher/test-segment-publisher.cpp b/tests/publisher/test-segment-publisher.cpp
index 2849457..c6b4fba 100644
--- a/tests/publisher/test-segment-publisher.cpp
+++ b/tests/publisher/test-segment-publisher.cpp
@@ -134,7 +134,7 @@
}
protected:
- ndn::shared_ptr<ndn::util::DummyClientFace> m_face;
+ std::shared_ptr<ndn::util::DummyClientFace> m_face;
const ndn::time::milliseconds m_expectedFreshnessPeriod;
TestSegmentPublisher<N> m_publisher;
ndn::EncodingBuffer m_buffer;
diff --git a/tests/security/test-certificate-store.cpp b/tests/security/test-certificate-store.cpp
index 42964eb..de3207e 100644
--- a/tests/security/test-certificate-store.cpp
+++ b/tests/security/test-certificate-store.cpp
@@ -51,7 +51,7 @@
}
public:
- shared_ptr<ndn::IdentityCertificate> certificate;
+ std::shared_ptr<ndn::IdentityCertificate> certificate;
ndn::Name certificateKey;
};
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index d326765..817b77e 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -53,8 +53,8 @@
{
protected:
UnitTestTimeFixture()
- : steadyClock(make_shared<ndn::time::UnitTestSteadyClock>())
- , systemClock(make_shared<ndn::time::UnitTestSystemClock>())
+ : steadyClock(std::make_shared<ndn::time::UnitTestSteadyClock>())
+ , systemClock(std::make_shared<ndn::time::UnitTestSystemClock>())
{
ndn::time::setCustomClocks(steadyClock, systemClock);
}
@@ -80,8 +80,8 @@
}
protected:
- shared_ptr<ndn::time::UnitTestSteadyClock> steadyClock;
- shared_ptr<ndn::time::UnitTestSystemClock> systemClock;
+ std::shared_ptr<ndn::time::UnitTestSteadyClock> steadyClock;
+ std::shared_ptr<ndn::time::UnitTestSystemClock> systemClock;
};
} // namespace test
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index d65fa45..dc4ae9a 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -35,7 +35,7 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
const std::string SECTION_GENERAL =
"general\n"
@@ -132,8 +132,8 @@
{
public:
ConfFileProcessorFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>())
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, CONFIG_FILE("unit-test-nlsr.conf")
, m_logConfigFileName(boost::filesystem::unique_path().native())
, m_logFileName(boost::filesystem::unique_path().native())
@@ -200,7 +200,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
private:
@@ -479,7 +479,7 @@
ndn::KeyChain keyChain;
keyChain.createIdentity(identity);
ndn::Name certName = keyChain.getDefaultCertificateNameForIdentity(identity);
- shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
+ std::shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
const boost::filesystem::path CERT_PATH =
(boost::filesystem::current_path() / std::string("cert-to-publish.cert"));
diff --git a/tests/test-fib.cpp b/tests/test-fib.cpp
index e0df315..790a42c 100644
--- a/tests/test-fib.cpp
+++ b/tests/test-fib.cpp
@@ -32,13 +32,13 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
class FibFixture : public BaseFixture
{
public:
FibFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
+ : face(std::make_shared<ndn::util::DummyClientFace>())
, interests(face->sentInterests)
{
INIT_LOGGERS("/tmp", "DEBUG");
@@ -54,8 +54,8 @@
conf.setMaxFacesPerPrefix(2);
- fib = ndn::make_shared<Fib>(ndn::ref(*face), ndn::ref(g_scheduler), ndn::ref(adjacencies),
- ndn::ref(conf), keyChain);
+ fib = std::make_shared<Fib>(std::ref(*face), std::ref(g_scheduler), std::ref(adjacencies),
+ std::ref(conf), keyChain);
fib->m_faceMap.update(router1FaceUri, router1FaceId);
fib->m_faceMap.update(router2FaceUri, router2FaceId);
@@ -63,9 +63,9 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
ndn::KeyChain keyChain;
- shared_ptr<Fib> fib;
+ std::shared_ptr<Fib> fib;
AdjacencyList adjacencies;
ConfParameter conf;
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index 97daac0..84cfbf6 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -37,7 +37,7 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
using ndn::time::system_clock;
static const system_clock::TimePoint MAX_TIME = system_clock::TimePoint::max();
@@ -45,8 +45,8 @@
{
public:
HyperbolicCalculatorFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>())
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, routingTable(nlsr.getRoutingTable())
, adjacencies(nlsr.getAdjacencyList())
, lsdb(nlsr.getLsdb())
@@ -105,7 +105,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
Map map;
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 04c5ff4..f4fffb6 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -41,8 +41,8 @@
{
public:
LinkStateCalculatorFixture()
- : face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, routingTable(nlsr.getRoutingTable())
, lsdb(nlsr.getLsdb())
{
@@ -101,7 +101,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
Map map;
diff --git a/tests/test-lsa-rule.cpp b/tests/test-lsa-rule.cpp
index 79feb03..d60d6a0 100644
--- a/tests/test-lsa-rule.cpp
+++ b/tests/test-lsa-rule.cpp
@@ -41,7 +41,7 @@
{
public:
LsaRuleFixture()
- : face(make_shared<ndn::util::DummyClientFace>(g_ioService))
+ : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
, rootId(ndn::Name("ndn"))
, siteIdentity(ndn::Name("/ndn/edu/test-site"))
, opIdentity(ndn::Name(siteIdentity).append(ndn::Name("%C1.Operator/op1")))
@@ -55,7 +55,7 @@
keyChain.deleteIdentity(opIdentity);
keyChain.deleteIdentity(routerId);
}
- catch (std::exception& e) {
+ catch (const std::exception& e) {
}
createCert(rootId, rootCertName, rootCert, rootId);
@@ -102,12 +102,12 @@
}
void
- createCert(ndn::Name& identity, ndn::Name& certName, shared_ptr<IdentityCertificate>& cert, const ndn::Name& signer)
+ createCert(ndn::Name& identity, ndn::Name& certName, std::shared_ptr<IdentityCertificate>& cert, const ndn::Name& signer)
{
ndn::Name keyName = keyChain.generateRsaKeyPairAsDefault(identity, true);
- cert = ndn::make_shared<ndn::IdentityCertificate>();
- ndn::shared_ptr<ndn::PublicKey> pubKey = keyChain.getPublicKey(keyName);
+ cert = std::make_shared<ndn::IdentityCertificate>();
+ std::shared_ptr<ndn::PublicKey> pubKey = keyChain.getPublicKey(keyName);
certName = keyName.getPrefix(-1);
certName.append("KEY").append(keyName.get(-1)).append("ID-CERT").appendVersion();
cert->setName(certName);
@@ -150,12 +150,12 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
ndn::KeyChain keyChain;
ndn::Name rootId, siteIdentity, opIdentity, routerId;
ndn::Name rootCertName, siteCertName, opCertName, routerCertName;
- shared_ptr<IdentityCertificate> rootCert, siteCert, opCert, routerCert;
+ std::shared_ptr<IdentityCertificate> rootCert, siteCert, opCert, routerCert;
Nlsr nlsr;
@@ -179,7 +179,7 @@
// Append version, segmentNo
lsaInterestName.appendNumber(1).appendNumber(1);
- ndn::shared_ptr<ndn::Data> data = ndn::make_shared<ndn::Data>();
+ std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
data->setName(lsaInterestName);
data->setFreshnessPeriod(ndn::time::seconds(10));
@@ -188,8 +188,8 @@
// Make NLSR validate data signed by its own key
nlsr.getValidator().validate(*data,
- [] (const shared_ptr<const Data>&) { BOOST_CHECK(true); },
- [] (const shared_ptr<const Data>&, const std::string&) {
+ [] (const std::shared_ptr<const Data>&) { BOOST_CHECK(true); },
+ [] (const std::shared_ptr<const Data>&, const std::string&) {
BOOST_CHECK(false);
});
}
@@ -210,15 +210,15 @@
// Append version, segmentNo
lsaInterestName.appendNumber(1).appendNumber(1);
- ndn::shared_ptr<ndn::Data> data = ndn::make_shared<ndn::Data>();
+ std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
data->setName(lsaInterestName);
data->setFreshnessPeriod(ndn::time::seconds(10));
nlsr.getKeyChain().sign(*data, ndn::security::signingByCertificate(nlsr.getDefaultCertName()));
// Make NLSR validate data signed by its own key
nlsr.getValidator().validate(*data,
- [] (const shared_ptr<const Data>&) { BOOST_CHECK(false); },
- [] (const shared_ptr<const Data>&, const std::string&) {
+ [] (const std::shared_ptr<const Data>&) { BOOST_CHECK(false); },
+ [] (const std::shared_ptr<const Data>&, const std::string&) {
BOOST_CHECK(true);
});
}
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 959c079..5d1613c 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -33,14 +33,14 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
class LsdbFixture : public BaseFixture
{
public:
LsdbFixture()
- : face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, sync(*face, nlsr.getLsdb(), nlsr.getConfParameter(), nlsr.getSequencingManager())
, lsdb(nlsr.getLsdb())
, conf(nlsr.getConfParameter())
@@ -90,7 +90,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
SyncLogicHandler sync;
@@ -216,7 +216,7 @@
ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/name/");
interestName.appendNumber(seqNo);
- const ndn::ConstBufferPtr bufferPtr = make_shared<ndn::Buffer>(lsa.getData().c_str(),
+ const ndn::ConstBufferPtr bufferPtr = std::make_shared<ndn::Buffer>(lsa.getData().c_str(),
lsa.getData().size());
lsdb.afterFetchLsa(bufferPtr, interestName);
diff --git a/tests/test-name-prefix-table.cpp b/tests/test-name-prefix-table.cpp
index 58e771e..daaafe9 100644
--- a/tests/test-name-prefix-table.cpp
+++ b/tests/test-name-prefix-table.cpp
@@ -32,8 +32,8 @@
{
public:
NamePrefixTableFixture()
- : face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, lsdb(nlsr.getLsdb())
, npt(nlsr.getNamePrefixTable())
{
@@ -41,7 +41,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
Lsdb& lsdb;
@@ -148,7 +148,7 @@
{
NamePrefixTable& npt = nlsr.getNamePrefixTable();
RoutingTablePoolEntry rtpe1("router1", 0);
- shared_ptr<RoutingTablePoolEntry> rtpePtr = npt.addRtpeToPool(rtpe1);
+ std::shared_ptr<RoutingTablePoolEntry> rtpePtr = npt.addRtpeToPool(rtpe1);
npt.addRtpeToPool(rtpe1);
@@ -162,7 +162,7 @@
{
NamePrefixTable& npt = nlsr.getNamePrefixTable();
RoutingTablePoolEntry rtpe1("/ndn/memphis/rtr1", 0);
- shared_ptr<RoutingTablePoolEntry> rtpePtr = npt.addRtpeToPool(rtpe1);
+ std::shared_ptr<RoutingTablePoolEntry> rtpePtr = npt.addRtpeToPool(rtpe1);
NamePrefixTableEntry npte1("/ndn/memphis/rtr2");
npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/rtr1");
@@ -172,8 +172,8 @@
npt.m_table.end(),
npte1);
- std::list<shared_ptr<RoutingTablePoolEntry>> rtpeList = nItr->getRteList();
- std::list<shared_ptr<RoutingTablePoolEntry>>::iterator rItr =
+ std::list<std::shared_ptr<RoutingTablePoolEntry>> rtpeList = nItr->getRteList();
+ std::list<std::shared_ptr<RoutingTablePoolEntry>>::iterator rItr =
std::find(rtpeList.begin(),
rtpeList.end(),
rtpePtr);
@@ -198,7 +198,7 @@
npt.m_table.end(),
npte1);
- std::list<shared_ptr<RoutingTablePoolEntry>> rtpeList = nItr->getRteList();
+ std::list<std::shared_ptr<RoutingTablePoolEntry>> rtpeList = nItr->getRteList();
BOOST_CHECK_EQUAL(rtpeList.size(), 1);
BOOST_CHECK_EQUAL(npt.m_rtpool.size(), 1);
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 531ea8c..ebf9beb 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -30,14 +30,14 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
class NlsrFixture : public UnitTestTimeFixture
{
public:
NlsrFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>())
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, lsdb(nlsr.getLsdb())
, neighbors(nlsr.getAdjacencyList())
{
@@ -49,13 +49,13 @@
ndn::Name dataName(sender);
dataName.append("NLSR").append("INFO").append(receiver.wireEncode()).appendVersion();
- shared_ptr<ndn::Data> data = make_shared<ndn::Data>(dataName);
+ std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>(dataName);
nlsr.m_helloProtocol.onContentValidated(data);
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
Lsdb& lsdb;
AdjacencyList& neighbors;
@@ -125,8 +125,8 @@
BOOST_FIXTURE_TEST_CASE(FaceDestroyEvent, UnitTestTimeFixture)
{
- shared_ptr<ndn::util::DummyClientFace> face = make_shared<ndn::util::DummyClientFace>(g_ioService);
- Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
+ std::shared_ptr<ndn::util::DummyClientFace> face = std::make_shared<ndn::util::DummyClientFace>(g_ioService);
+ Nlsr nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain);
Lsdb& lsdb = nlsr.getLsdb();
// Simulate loading configuration file
@@ -201,7 +201,7 @@
event.setKind(ndn::nfd::FACE_EVENT_DESTROYED)
.setFaceId(destroyFaceId);
- shared_ptr<ndn::Data> data = make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+ std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
data->setContent(event.wireEncode());
nlsr.getKeyChain().sign(*data);
@@ -236,8 +236,8 @@
// refresh will not cause RIB entries for other nodes' name prefixes to be refreshed.
BOOST_FIXTURE_TEST_CASE(FaceDestroyEventInactive, UnitTestTimeFixture)
{
- shared_ptr<ndn::util::DummyClientFace> face = make_shared<ndn::util::DummyClientFace>(g_ioService);
- Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
+ std::shared_ptr<ndn::util::DummyClientFace> face = std::make_shared<ndn::util::DummyClientFace>(g_ioService);
+ Nlsr nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain);
Lsdb& lsdb = nlsr.getLsdb();
// Simulate loading configuration file
@@ -314,7 +314,7 @@
event.setKind(ndn::nfd::FACE_EVENT_DESTROYED)
.setFaceId(destroyFaceId);
- shared_ptr<ndn::Data> data = make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+ std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
data->setContent(event.wireEncode());
nlsr.getKeyChain().sign(*data);
@@ -348,7 +348,7 @@
ndn::KeyChain keyChain;
keyChain.createIdentity(identity);
ndn::Name certName = keyChain.getDefaultCertificateNameForIdentity(identity);
- shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
+ std::shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
const ndn::Name certKey = certificate->getName().getPrefix(-1);
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index 0000de9..0d08401 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -29,14 +29,14 @@
namespace nlsr {
namespace test {
-using ndn::shared_ptr;
+using std::shared_ptr;
class SyncLogicFixture : public BaseFixture
{
public:
SyncLogicFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
+ : face(std::make_shared<ndn::util::DummyClientFace>())
+ , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
, sync(nlsr.getSyncLogicHandler())
, CONFIG_NETWORK("/ndn")
, CONFIG_SITE("/site")
@@ -59,13 +59,13 @@
face->processEvents(ndn::time::milliseconds(1));
face->sentInterests.clear();
- p_sync.onNsyncUpdate(updates, NULL);
+ p_sync.onNsyncUpdate(updates, nullptr);
face->processEvents(ndn::time::milliseconds(1));
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
Nlsr nlsr;
SyncLogicHandler& sync;
@@ -98,7 +98,7 @@
BOOST_AUTO_TEST_CASE(UpdateForOtherHR)
{
- Nlsr nlsr_hr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
+ Nlsr nlsr_hr(g_ioService, g_scheduler, std::ref(*face), g_keyChain);
SyncLogicHandler& sync_hr(nlsr_hr.getSyncLogicHandler());
nlsr_hr.getConfParameter().setNetwork(CONFIG_NETWORK);
@@ -132,7 +132,7 @@
BOOST_AUTO_TEST_CASE(UpdateForOtherHRDry)
{
- Nlsr nlsr_hrdry(g_ioService, g_scheduler, ndn::ref(*face),g_keyChain);
+ Nlsr nlsr_hrdry(g_ioService, g_scheduler, std::ref(*face),g_keyChain);
SyncLogicHandler& sync_hrdry(nlsr_hrdry.getSyncLogicHandler());
nlsr_hrdry.getConfParameter().setNetwork(CONFIG_NETWORK);
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 67c00f0..bf4f8f4 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -43,7 +43,7 @@
{
public:
PrefixUpdateFixture()
- : face(make_shared<ndn::util::DummyClientFace>(g_ioService))
+ : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
, siteIdentity(ndn::Name("/ndn/edu/test-site").appendVersion())
, opIdentity(ndn::Name(siteIdentity).append(ndn::Name("%C1.Operator")).appendVersion())
, nlsr(g_ioService, g_scheduler, *face, g_keyChain)
@@ -138,8 +138,8 @@
// Operator cert
ndn::Name keyName = keyChain.generateRsaKeyPairAsDefault(opIdentity, true);
- opCert = ndn::make_shared<ndn::IdentityCertificate>();
- ndn::shared_ptr<ndn::PublicKey> pubKey = keyChain.getPublicKey(keyName);
+ opCert = std::make_shared<ndn::IdentityCertificate>();
+ std::shared_ptr<ndn::PublicKey> pubKey = keyChain.getPublicKey(keyName);
opCertName = keyName.getPrefix(-1);
opCertName.append("KEY").append(keyName.get(-1)).append("ID-CERT").appendVersion();
opCert->setName(opCertName);
@@ -191,16 +191,16 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
ndn::KeyChain keyChain;
ndn::Name siteIdentity;
ndn::Name siteCertName;
- shared_ptr<IdentityCertificate> siteCert;
+ std::shared_ptr<IdentityCertificate> siteCert;
ndn::Name opIdentity;
ndn::Name opCertName;
- shared_ptr<IdentityCertificate> opCert;
+ std::shared_ptr<IdentityCertificate> opCert;
Nlsr nlsr;
ndn::Name keyPrefix;
@@ -222,7 +222,7 @@
ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
advertiseCommand.append(parameters.wireEncode());
- shared_ptr<Interest> advertiseInterest = make_shared<Interest>(advertiseCommand);
+ std::shared_ptr<Interest> advertiseInterest = std::make_shared<Interest>(advertiseCommand);
keyChain.signByIdentity(*advertiseInterest, opIdentity);
face->receive(*advertiseInterest);
@@ -240,7 +240,7 @@
ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
withdrawCommand.append(parameters.wireEncode());
- shared_ptr<Interest> withdrawInterest = make_shared<Interest>(withdrawCommand);
+ std::shared_ptr<Interest> withdrawInterest = std::make_shared<Interest>(withdrawCommand);
keyChain.signByIdentity(*withdrawInterest, opIdentity);
face->receive(*withdrawInterest);
@@ -259,7 +259,7 @@
ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
advertiseCommand.append(parameters.wireEncode());
- shared_ptr<Interest> advertiseInterest = make_shared<Interest>(advertiseCommand);
+ std::shared_ptr<Interest> advertiseInterest = std::make_shared<Interest>(advertiseCommand);
keyChain.signByIdentity(*advertiseInterest, opIdentity);
// Command should be rejected
diff --git a/tests/utility/test-face-controller.cpp b/tests/utility/test-face-controller.cpp
index f439ebd..7684256 100644
--- a/tests/utility/test-face-controller.cpp
+++ b/tests/utility/test-face-controller.cpp
@@ -31,15 +31,15 @@
namespace nlsr {
namespace test {
-using ndn::bind;
-using ndn::shared_ptr;
+using std::bind;
+using std::shared_ptr;
using ndn::Interest;
class FaceControllerFixture : public BaseFixture
{
public:
FaceControllerFixture()
- : face(make_shared<ndn::util::DummyClientFace>())
+ : face(std::make_shared<ndn::util::DummyClientFace>())
, interests(face->sentInterests)
, controller(*face, keyChain)
, faceController(g_ioService, controller)
@@ -53,7 +53,7 @@
}
public:
- shared_ptr<ndn::util::DummyClientFace> face;
+ std::shared_ptr<ndn::util::DummyClientFace> face;
ndn::KeyChain keyChain;
std::vector<Interest>& interests;
ndn::nfd::Controller controller;
@@ -85,7 +85,7 @@
{
faceController.createFace("invalid://256.0.0.1:6363",
nullptr,
- bind(&FaceControllerFixture::onFailure, this, _1));
+ std::bind(&FaceControllerFixture::onFailure, this, _1));
face->processEvents(ndn::time::milliseconds(1));