tests: set CanBePrefix in daemon tests
This commit also updates makeInterest and makeNack functions
so that their APIs are compatible with ndn-cxx test suite.
refs #4581
Change-Id: I0c81740416c26a03450dc3a12c89944b72ce5901
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 4b83e46..0214152 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -118,7 +118,7 @@
fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
- shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+ auto interest = makeInterest("/localhost/A/1");
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
@@ -137,7 +137,7 @@
fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
- shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+ auto interest = makeInterest("/localhost/A/1");
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
@@ -160,7 +160,7 @@
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
- shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+ auto interest = makeInterest("/localhost/A/1");
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
@@ -180,7 +180,7 @@
fib::Entry* fibEntry = this->fib.insert("/localhop/A").first;
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
- shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
+ auto interest = makeInterest("/localhop/A/1");
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
@@ -203,7 +203,7 @@
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
- shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
+ auto interest = makeInterest("/localhop/A/1");
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
@@ -224,10 +224,10 @@
fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
- shared_ptr<Interest> interest = makeInterest("/localhost/A/1", 1460);
+ auto interest = makeInterest("/localhost/A/1", false, nullopt, 1460);
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
- lp::Nack nack = makeNack("/localhost/A/1", 1460, lp::NackReason::NO_ROUTE);
+ lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
BOOST_REQUIRE(this->strategy.waitForAction(
@@ -249,10 +249,10 @@
fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
- shared_ptr<Interest> interest = makeInterest("/localhop/A/1", 1377);
+ auto interest = makeInterest("/localhop/A/1", 1377);
shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
- lp::Nack nack = makeNack("/localhop/A/1", 1377, lp::NackReason::NO_ROUTE);
+ lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
BOOST_REQUIRE(this->strategy.waitForAction(