nlsr: Don't use ndn aliases provided by ndn-cxx/common.hpp
refs: #3983
Change-Id: I31da8d68e0285dcfe9c7d3e5e678c00397d22bef
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);
});
}