face: use IncomingFaceId, NextHopFaceId, CachePolicy tags
This commit replaces all LocalControlHeader usages with these tags,
and deletes LocalFace.
This commit also does minor improvements in RIB test suites.
refs #3339
Change-Id: I14cbfc296a6723a5860bf8bd95d9804d3bac3da5
diff --git a/tests/daemon/table/cs-policy-lru.t.cpp b/tests/daemon/table/cs-policy-lru.t.cpp
index 02ce3c0..a4e76a8 100644
--- a/tests/daemon/table/cs-policy-lru.t.cpp
+++ b/tests/daemon/table/cs-policy-lru.t.cpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "table/cs.hpp"
#include "table/cs-policy-lru.hpp"
+#include "table/cs.hpp"
#include <ndn-cxx/util/crypto.hpp>
#include "tests/test-common.hpp"
@@ -34,7 +34,6 @@
namespace tests {
using namespace nfd::tests;
-using ndn::nfd::LocalControlHeader;
BOOST_AUTO_TEST_SUITE(CsLru)
diff --git a/tests/daemon/table/cs-policy-priority-fifo.t.cpp b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
index 8fd1746..8f365d4 100644
--- a/tests/daemon/table/cs-policy-priority-fifo.t.cpp
+++ b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "table/cs.hpp"
#include "table/cs-policy-priority-fifo.hpp"
+#include "table/cs.hpp"
#include <ndn-cxx/util/crypto.hpp>
#include "tests/test-common.hpp"
@@ -34,7 +34,6 @@
namespace tests {
using namespace nfd::tests;
-using ndn::nfd::LocalControlHeader;
BOOST_AUTO_TEST_SUITE(CsPriorityFifo)
diff --git a/tests/daemon/table/cs.t.cpp b/tests/daemon/table/cs.t.cpp
index 0b3bebb..63caa44 100644
--- a/tests/daemon/table/cs.t.cpp
+++ b/tests/daemon/table/cs.t.cpp
@@ -35,7 +35,6 @@
namespace tests {
using namespace nfd::tests;
-using ndn::nfd::LocalControlHeader;
BOOST_FIXTURE_TEST_SUITE(TableCs, BaseFixture)
@@ -316,13 +315,16 @@
BOOST_AUTO_TEST_SUITE_END()
-BOOST_AUTO_TEST_CASE(CachingPolicyNoCache)
+BOOST_AUTO_TEST_CASE(CachePolicyNoCache)
{
Cs cs(3);
shared_ptr<Data> dataA = makeData("ndn:/A");
- dataA->getLocalControlHeader().setCachingPolicy(LocalControlHeader::CachingPolicy::NO_CACHE);
dataA->wireEncode();
+
+ dataA->setTag(make_shared<lp::CachePolicyTag>(
+ lp::CachePolicy().setPolicy(lp::CachePolicyType::NO_CACHE)));
+
BOOST_CHECK_EQUAL(cs.insert(*dataA), false);
cs.find(Interest("ndn:/A"),