tests: Don't use namespace ptr_lib and qualify ptr_lib::shared_ptr explicitly in case the application also uses std::shared_ptr, etc.
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 6e2c731..bdea5b0 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -17,7 +17,6 @@
using namespace std;
using namespace ndn;
-using namespace ndn::ptr_lib;
using namespace ndn::func_lib;
static uint8_t DEFAULT_PUBLIC_KEY_DER[] = {
@@ -75,7 +74,7 @@
// onInterest.
void operator()
- (const shared_ptr<const Name>& prefix, const shared_ptr<const Interest>& interest, Transport& transport,
+ (const ptr_lib::shared_ptr<const Name>& prefix, const ptr_lib::shared_ptr<const Interest>& interest, Transport& transport,
uint64_t registeredPrefixId)
{
++responseCount_;
@@ -93,7 +92,7 @@
}
// onRegisterFailed.
- void operator()(const shared_ptr<const Name>& prefix)
+ void operator()(const ptr_lib::shared_ptr<const Name>& prefix)
{
++responseCount_;
cout << "Register failed for prefix " << prefix->toUri() << endl;
@@ -109,10 +108,10 @@
try {
Face face("localhost");
- shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
- shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
+ ptr_lib::shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+ ptr_lib::shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
KeyChain keyChain
- (make_shared<IdentityManager>(identityStorage, privateKeyStorage), make_shared<NoVerifyPolicyManager>());
+ (ptr_lib::make_shared<IdentityManager>(identityStorage, privateKeyStorage), ptr_lib::shared_ptr<NoVerifyPolicyManager>(new NoVerifyPolicyManager()));
keyChain.setFace(&face);
// Initialize the storage.