tests: Small refactoring of test cases
Change-Id: I09c372c0c9c8220b3408fafbb41c43e5c216884f
Refs: #1695, #1434
diff --git a/src/handles/base-handle.hpp b/src/handles/base-handle.hpp
index 3048856..9427356 100644
--- a/src/handles/base-handle.hpp
+++ b/src/handles/base-handle.hpp
@@ -74,13 +74,13 @@
{
return m_scheduler;
}
-/*
- inline RepoStorage&
- getStoreIndex()
- {
- return m_storeindex;
- }
-*/
+
+ // inline RepoStorage&
+ // getStoreIndex()
+ // {
+ // return m_storeindex;
+ // }
+
uint64_t
generateProcessId();
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index 4b0ac85..91ff244 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -22,6 +22,7 @@
#include "base-handle.hpp"
#include <ndn-cxx/security/validator-config.hpp>
+
namespace repo {
using std::vector;
@@ -61,8 +62,8 @@
onValidationFailed(const shared_ptr<const Interest>& interest, const string& reason);
/**
- * @todo delete check has not been realized due to the while loop of segmented data deletion.
- */
+ * @todo delete check has not been realized due to the while loop of segmented data deletion.
+ */
void
onCheckInterest(const Name& prefix, const Interest& interest);
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 6d42630..48bd0e4 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -21,9 +21,9 @@
#define REPO_HANDLES_WRITE_HANDLE_HPP
#include "base-handle.hpp"
-//#include <ndn-cxx/security/signature-sha256.hpp>
-#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
+
#include <ndn-cxx/security/validator-config.hpp>
+
#include <queue>
namespace repo {
diff --git a/src/storage/index.cpp b/src/storage/index.cpp
index d2472fb..b141b51 100644
--- a/src/storage/index.cpp
+++ b/src/storage/index.cpp
@@ -100,7 +100,7 @@
}
else
{
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
}
}
@@ -114,7 +114,7 @@
}
else
{
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
}
}
@@ -138,7 +138,7 @@
}
else
{
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
}
}
@@ -185,7 +185,7 @@
it != m_skipList.end(); ++it)
{
if (!interest.getName().isPrefixOf(it->getName()))
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
if (matchesSimpleSelectors(interest, hash, (*it)))
return std::make_pair(it->getId(), it->getName());
}
@@ -194,7 +194,7 @@
{
IndexSkipList::const_iterator boundary = m_skipList.lower_bound(interest.getName());
if (boundary == m_skipList.end() || !interest.getName().isPrefixOf(boundary->getName()))
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
Name successor = interest.getName().getSuccessor();
IndexSkipList::const_iterator last = interest.getName().size() == 0 ?
m_skipList.end() : m_skipList.lower_bound(interest.getName().getSuccessor());
@@ -210,7 +210,7 @@
return std::make_pair(prev->getId(), prev->getName());
}
else
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
}
IndexSkipList::const_iterator first =
m_skipList.lower_bound(prev->getName().getPrefix(interest.getName().size() + 1));
@@ -223,7 +223,7 @@
last = first;
}
}
- return std::pair<int64_t,Name>();
+ return std::make_pair(0, Name());
}
Index::Entry::Entry(const Data& data, const int64_t id)