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/algorithm.t.cpp b/tests/daemon/fw/algorithm.t.cpp
index 96284f3..3ec11da 100644
--- a/tests/daemon/fw/algorithm.t.cpp
+++ b/tests/daemon/fw/algorithm.t.cpp
@@ -60,7 +60,7 @@
 
 BOOST_AUTO_TEST_CASE(Unrestricted)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/ieWRzDsCu");
+  auto interest = makeInterest("ndn:/ieWRzDsCu");
 
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *nonLocalFace2), false);
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *localFace4), false);
@@ -70,7 +70,7 @@
 
 BOOST_AUTO_TEST_CASE(Localhost)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/localhost/5n1LzIt3");
+  auto interest = makeInterest("ndn:/localhost/5n1LzIt3");
 
   // /localhost Interests from non-local faces should be rejected by incoming Interest pipeline,
   // and are not tested here.
@@ -80,7 +80,7 @@
 
 BOOST_AUTO_TEST_CASE(Localhop)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
+  auto interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
 
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *nonLocalFace2), true);
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *localFace4), false);
@@ -92,7 +92,7 @@
 
 BOOST_AUTO_TEST_CASE(CanForwardToLegacy)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/WDsuBLIMG");
+  auto interest = makeInterest("ndn:/WDsuBLIMG");
   pit::Entry entry(*interest);
 
   auto face1 = make_shared<DummyFace>();
@@ -116,7 +116,7 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/qtCQ7I1c");
+  auto interest = makeInterest("ndn:/qtCQ7I1c");
   interest->setNonce(25559);
 
   pit::Entry entry0(*interest);
@@ -176,9 +176,7 @@
   auto face2 = make_shared<DummyFace>();
   auto face3 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/totzXG0d");
-  interest->setNonce(29321);
-
+  auto interest = makeInterest("/totzXG0d", false, nullopt, 29321);
   pit::Entry entry(*interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
@@ -193,7 +191,7 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2, 0);
   BOOST_REQUIRE(outR != entry.out_end());
-  lp::Nack nack = makeNack("ndn:/totzXG0d", 29321, lp::NackReason::DUPLICATE);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::DUPLICATE);
   bool isNackAccepted = outR->setIncomingNack(nack); // Nack arrival
   BOOST_REQUIRE(isNackAccepted);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
@@ -210,7 +208,7 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/c1I7QCtc");
+  auto interest = makeInterest("ndn:/c1I7QCtc");
   pit::Entry entry(*interest);
 
   time::steady_clock::TimePoint before = time::steady_clock::now();