tests: Added using namespace ptr_lib, remove ptr_lib::.
diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index e3d0838..a88bde0 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -14,6 +14,7 @@
using namespace std;
using namespace ndn;
+using namespace ptr_lib;
using namespace func_lib;
#if HAVE_STD_FUNCTION
// In the std library, the placeholders are in a different namespace than boost.
@@ -157,7 +158,7 @@
}
}
-static void onVerified(const char *prefix, const ptr_lib::shared_ptr<Data>& data)
+static void onVerified(const char *prefix, const shared_ptr<Data>& data)
{
cout << prefix << " signature verification: VERIFIED" << endl;
}
@@ -170,25 +171,25 @@
int main(int argc, char** argv)
{
try {
- ptr_lib::shared_ptr<Data> data(new Data());
+ shared_ptr<Data> data(new Data());
data->wireDecode(Data1, sizeof(Data1));
cout << "Decoded Data:" << endl;
dumpData(*data);
Blob encoding = data->wireEncode();
- ptr_lib::shared_ptr<Data> reDecodedData(new Data());
+ shared_ptr<Data> reDecodedData(new Data());
reDecodedData->wireDecode(*encoding);
cout << endl << "Re-decoded Data:" << endl;
dumpData(*reDecodedData);
- ptr_lib::shared_ptr<Data> freshData(new Data(Name("/ndn/abc")));
+ shared_ptr<Data> freshData(new Data(Name("/ndn/abc")));
const unsigned char freshContent[] = "SUCCESS!";
freshData->setContent(freshContent, sizeof(freshContent) - 1);
freshData->getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
- ptr_lib::shared_ptr<PrivateKeyStorage> privateKeyStorage(new PrivateKeyStorage());
- ptr_lib::shared_ptr<IdentityManager> identityManager(new IdentityManager(privateKeyStorage));
+ shared_ptr<PrivateKeyStorage> privateKeyStorage(new PrivateKeyStorage());
+ shared_ptr<IdentityManager> identityManager(new IdentityManager(privateKeyStorage));
KeyChain keyChain(identityManager);
keyChain.signData(*freshData);
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 124ea4c..a50c34e 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -25,7 +25,7 @@
callbackCount_ = 0;
}
- void onData(const ptr_lib::shared_ptr<const Interest>& interest, const ptr_lib::shared_ptr<Data>& data)
+ void onData(const shared_ptr<const Interest>& interest, const shared_ptr<Data>& data)
{
++callbackCount_;
cout << "Got data packet with name " << data->getName().to_uri() << endl;
@@ -34,7 +34,7 @@
cout << endl;
}
- void onTimeout(const ptr_lib::shared_ptr<const Interest>& interest)
+ void onTimeout(const shared_ptr<const Interest>& interest)
{
++callbackCount_;
cout << "Time out for interest " << interest->getName().toUri() << endl;
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index ebc1e8f..e895e88 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -24,7 +24,7 @@
}
void operator()
- (const ptr_lib::shared_ptr<const Name>& prefix, const ptr_lib::shared_ptr<const Interest>& interest, Transport& transport) {
+ (const shared_ptr<const Name>& prefix, const shared_ptr<const Interest>& interest, Transport& transport) {
++interestCount_;
// Make and sign a Data packet.