tests: register instead of install DummyStrategy
refs #3868
Change-Id: I5e44582625be51ef874e2a92e4bb7cc22d5b607b
diff --git a/tests/daemon/fw/choose-strategy.hpp b/tests/daemon/fw/choose-strategy.hpp
new file mode 100644
index 0000000..9ecc54b
--- /dev/null
+++ b/tests/daemon/fw/choose-strategy.hpp
@@ -0,0 +1,64 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_TESTS_DAEMON_FW_CHOOSE_STRATEGY_HPP
+#define NFD_TESTS_DAEMON_FW_CHOOSE_STRATEGY_HPP
+
+#include "fw/forwarder.hpp"
+#include "table/strategy-choice.hpp"
+
+namespace nfd {
+namespace fw {
+class Strategy;
+} // namespace fw
+
+namespace tests {
+
+/** \brief choose the strategy for a namespace
+ * \tparam S strategy type, must be a complete type
+ * \param forwarder the forwarder
+ * \param prefix namespace to choose the strategy for
+ * \param instanceName strategy instance name; the strategy must already be registered
+ * \throw std::invalid_argument cannot find strategy by instanceName
+ * \throw std::bad_cast strategy type is incompatible with S
+ * \return a reference to the strategy
+ */
+template<typename S>
+typename std::enable_if<std::is_base_of<fw::Strategy, S>::value, S&>::type
+choose(Forwarder& forwarder, const Name& prefix = "/",
+ const Name& instanceName = S::getStrategyName())
+{
+ StrategyChoice& sc = forwarder.getStrategyChoice();
+ bool isInserted = sc.insert(prefix, instanceName);
+ if (!isInserted) {
+ BOOST_THROW_EXCEPTION(std::invalid_argument("cannot create strategy"));
+ }
+ return dynamic_cast<S&>(sc.findEffectiveStrategy(prefix));
+}
+
+} // namespace tests
+} // namespace nfd
+
+#endif // NFD_TESTS_DAEMON_FW_CHOOSE_STRATEGY_HPP
diff --git a/tests/daemon/fw/dummy-strategy.cpp b/tests/daemon/fw/dummy-strategy.cpp
new file mode 100644
index 0000000..f806d08
--- /dev/null
+++ b/tests/daemon/fw/dummy-strategy.cpp
@@ -0,0 +1,90 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "dummy-strategy.hpp"
+
+namespace nfd {
+namespace tests {
+
+NFD_REGISTER_STRATEGY(DummyStrategy);
+
+void
+DummyStrategy::registerAs(const Name& strategyName)
+{
+ registerAsImpl<DummyStrategy>(strategyName);
+}
+
+Name
+DummyStrategy::getStrategyName(uint64_t version)
+{
+ return Name("/dummy-strategy").appendVersion(version);
+}
+
+DummyStrategy::DummyStrategy(Forwarder& forwarder, const Name& name)
+ : Strategy(forwarder)
+ , afterReceiveInterest_count(0)
+ , beforeSatisfyInterest_count(0)
+ , beforeExpirePendingInterest_count(0)
+ , afterReceiveNack_count(0)
+{
+ this->setInstanceName(name);
+}
+
+void
+DummyStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+ const shared_ptr<pit::Entry>& pitEntry)
+{
+ ++afterReceiveInterest_count;
+
+ if (interestOutFace != nullptr) {
+ this->sendInterest(pitEntry, *interestOutFace, interest);
+ }
+ else {
+ this->rejectPendingInterest(pitEntry);
+ }
+}
+
+void
+DummyStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
+ const Face& inFace, const Data& data)
+{
+ ++beforeSatisfyInterest_count;
+}
+
+void
+DummyStrategy::beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry)
+{
+ ++beforeExpirePendingInterest_count;
+}
+
+void
+DummyStrategy::afterReceiveNack(const Face& inFace, const lp::Nack& nack,
+ const shared_ptr<pit::Entry>& pitEntry)
+{
+ ++afterReceiveNack_count;
+}
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index a6af8ac..6d4d45d 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -33,28 +33,27 @@
/** \brief strategy for unit testing
*
- * Unless otherwise indicated, triggers are recorded but does nothing.
+ * Triggers are recorded but do nothing.
+ *
+ * DummyStrategy registers itself as /dummy-strategy/<max-version>, so that it can be instantiated
+ * with any version number. Aliases can be created with \p registerAs function.
*/
class DummyStrategy : public fw::Strategy
{
public:
static void
- registerAs(const Name& name)
- {
- if (!fw::Strategy::canCreate(name)) {
- fw::Strategy::registerType<DummyStrategy>(name);
- }
- }
+ registerAs(const Name& strategyName);
- DummyStrategy(Forwarder& forwarder, const Name& name)
- : Strategy(forwarder)
- , afterReceiveInterest_count(0)
- , beforeSatisfyInterest_count(0)
- , beforeExpirePendingInterest_count(0)
- , afterReceiveNack_count(0)
- {
- this->setInstanceName(name);
- }
+ static Name
+ getStrategyName(uint64_t version = std::numeric_limits<uint64_t>::max());
+
+ /** \brief constructor
+ *
+ * \p name is recorded unchanged as \p getInstanceName() , and will not automatically
+ * gain a version number when instantiated without a version number.
+ */
+ explicit
+ DummyStrategy(Forwarder& forwarder, const Name& name = getStrategyName());
/** \brief after receive Interest trigger
*
@@ -63,36 +62,30 @@
*/
void
afterReceiveInterest(const Face& inFace, const Interest& interest,
- const shared_ptr<pit::Entry>& pitEntry) override
- {
- ++afterReceiveInterest_count;
-
- if (interestOutFace != nullptr) {
- this->sendInterest(pitEntry, *interestOutFace, interest);
- }
- else {
- this->rejectPendingInterest(pitEntry);
- }
- }
+ const shared_ptr<pit::Entry>& pitEntry) override;
void
beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
- const Face& inFace, const Data& data) override
- {
- ++beforeSatisfyInterest_count;
- }
+ const Face& inFace, const Data& data) override;
void
- beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry) override
- {
- ++beforeExpirePendingInterest_count;
- }
+ beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry) override;
void
afterReceiveNack(const Face& inFace, const lp::Nack& nack,
- const shared_ptr<pit::Entry>& pitEntry) override
+ const shared_ptr<pit::Entry>& pitEntry) override;
+
+protected:
+ /** \brief register an alias
+ * \tparam S subclass of DummyStrategy
+ */
+ template<typename S>
+ static void
+ registerAsImpl(const Name& strategyName)
{
- ++afterReceiveNack_count;
+ if (!fw::Strategy::canCreate(strategyName)) {
+ fw::Strategy::registerType<S>(strategyName);
+ }
}
public:
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 11ef06b..37cb5f9 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -26,7 +26,7 @@
#include "fw/forwarder.hpp"
#include "tests/daemon/face/dummy-face.hpp"
#include "dummy-strategy.hpp"
-#include "install-strategy.hpp"
+#include "choose-strategy.hpp"
#include <ndn-cxx/lp/tags.hpp>
#include "tests/test-common.hpp"
@@ -256,32 +256,32 @@
forwarder.addFace(face1);
forwarder.addFace(face2);
- DummyStrategy& strategyP = choose<DummyStrategy>(forwarder, "ndn:/", "ndn:/strategyP");
- DummyStrategy& strategyQ = choose<DummyStrategy>(forwarder, "ndn:/B", "ndn:/strategyQ");
+ DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
+ DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
shared_ptr<Interest> interest1 = makeInterest("ndn:/A/1");
- strategyP.afterReceiveInterest_count = 0;
- strategyP.interestOutFace = face2;
+ strategyA.afterReceiveInterest_count = 0;
+ strategyA.interestOutFace = face2;
forwarder.startProcessInterest(*face1, *interest1);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveInterest_count, 1);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveInterest_count, 1);
shared_ptr<Interest> interest2 = makeInterest("ndn:/B/2");
- strategyQ.afterReceiveInterest_count = 0;
- strategyQ.interestOutFace = face2;
+ strategyB.afterReceiveInterest_count = 0;
+ strategyB.interestOutFace = face2;
forwarder.startProcessInterest(*face1, *interest2);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveInterest_count, 1);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveInterest_count, 1);
this->advanceClocks(time::milliseconds(1), time::milliseconds(5));
shared_ptr<Data> data1 = makeData("ndn:/A/1/a");
- strategyP.beforeSatisfyInterest_count = 0;
+ strategyA.beforeSatisfyInterest_count = 0;
forwarder.startProcessData(*face2, *data1);
- BOOST_CHECK_EQUAL(strategyP.beforeSatisfyInterest_count, 1);
+ BOOST_CHECK_EQUAL(strategyA.beforeSatisfyInterest_count, 1);
shared_ptr<Data> data2 = makeData("ndn:/B/2/b");
- strategyQ.beforeSatisfyInterest_count = 0;
+ strategyB.beforeSatisfyInterest_count = 0;
forwarder.startProcessData(*face2, *data2);
- BOOST_CHECK_EQUAL(strategyQ.beforeSatisfyInterest_count, 1);
+ BOOST_CHECK_EQUAL(strategyB.beforeSatisfyInterest_count, 1);
shared_ptr<Interest> interest3 = makeInterest("ndn:/A/3");
interest3->setInterestLifetime(time::milliseconds(30));
@@ -290,11 +290,11 @@
interest4->setInterestLifetime(time::milliseconds(5000));
forwarder.startProcessInterest(*face1, *interest4);
- strategyP.beforeExpirePendingInterest_count = 0;
- strategyQ.beforeExpirePendingInterest_count = 0;
+ strategyA.beforeExpirePendingInterest_count = 0;
+ strategyB.beforeExpirePendingInterest_count = 0;
this->advanceClocks(time::milliseconds(10), time::milliseconds(100));
- BOOST_CHECK_EQUAL(strategyP.beforeExpirePendingInterest_count, 1);
- BOOST_CHECK_EQUAL(strategyQ.beforeExpirePendingInterest_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.beforeExpirePendingInterest_count, 1);
+ BOOST_CHECK_EQUAL(strategyB.beforeExpirePendingInterest_count, 0);
}
BOOST_AUTO_TEST_CASE(IncomingData)
@@ -345,8 +345,8 @@
forwarder.addFace(face2);
forwarder.addFace(face3);
- DummyStrategy& strategyP = choose<DummyStrategy>(forwarder, "ndn:/", "ndn:/strategyP");
- DummyStrategy& strategyQ = choose<DummyStrategy>(forwarder, "ndn:/B", "ndn:/strategyQ");
+ DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
+ DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
Pit& pit = forwarder.getPit();
@@ -359,18 +359,18 @@
pit2->insertOrUpdateOutRecord(*face1, *interest2);
lp::Nack nack1 = makeNack("/A/AYJqayrzF", 562, lp::NackReason::CONGESTION);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face1, nack1);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 1);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 1);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
lp::Nack nack2 = makeNack("/B/EVyP73ru", 221, lp::NackReason::CONGESTION);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face1, nack2);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 1);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 1);
// record Nack on PIT out-record
pit::OutRecordCollection::iterator outRecord1 = pit1->getOutRecord(*face1);
@@ -380,11 +380,11 @@
// drop if no PIT entry
lp::Nack nack3 = makeNack("/yEcw5HhdM", 243, lp::NackReason::CONGESTION);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face1, nack3);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
// drop if no out-record
shared_ptr<Interest> interest4 = makeInterest("/Etab4KpY", 157);
@@ -392,27 +392,27 @@
pit4->insertOrUpdateOutRecord(*face1, *interest4);
lp::Nack nack4a = makeNack("/Etab4KpY", 157, lp::NackReason::CONGESTION);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face2, nack4a);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
// drop if Nonce does not match out-record
lp::Nack nack4b = makeNack("/Etab4KpY", 294, lp::NackReason::CONGESTION);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face1, nack4b);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
// drop if inFace is multi-access
pit4->insertOrUpdateOutRecord(*face3, *interest4);
- strategyP.afterReceiveNack_count = 0;
- strategyQ.afterReceiveNack_count = 0;
+ strategyA.afterReceiveNack_count = 0;
+ strategyB.afterReceiveNack_count = 0;
forwarder.onIncomingNack(*face3, nack4a);
- BOOST_CHECK_EQUAL(strategyP.afterReceiveNack_count, 0);
- BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
+ BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
}
BOOST_AUTO_TEST_CASE(OutgoingNack)
diff --git a/tests/daemon/fw/install-strategy.hpp b/tests/daemon/fw/install-strategy.hpp
deleted file mode 100644
index a0dab28..0000000
--- a/tests/daemon/fw/install-strategy.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_TESTS_DAEMON_FW_INSTALL_STRATEGY_HPP
-#define NFD_TESTS_DAEMON_FW_INSTALL_STRATEGY_HPP
-
-#include "fw/forwarder.hpp"
-
-namespace nfd {
-namespace fw {
-class Strategy;
-} // namespace fw
-
-namespace tests {
-
-/** \brief install a strategy to forwarder
- * \tparam S strategy type
- * \param forwarder the forwarder
- * \param args arguments to strategy constructor
- * \throw std::bad_cast a strategy with duplicate strategyName is already installed
- * and has an incompatible type
- * \return a reference to the strategy
- * \deprecated use strategy registry
- * \todo #3868 delete this function template
- */
-template<typename S, typename ...Args>
-typename std::enable_if<std::is_base_of<fw::Strategy, S>::value, S&>::type
-install(Forwarder& forwarder, Args&&... args)
-{
- auto strategy = make_unique<S>(ref(forwarder), std::forward<Args>(args)...);
- fw::Strategy* installed = forwarder.getStrategyChoice().install(std::move(strategy)).second;
- return dynamic_cast<S&>(*installed);
-}
-
-/** \brief install a strategy to forwarder, and choose the strategy for a namespace
- * \tparam S strategy type
- * \param forwarder the forwarder
- * \param prefix namespace to choose the strategy for
- * \param args arguments to strategy constructor
- * \throw std::bad_cast a strategy with duplicate strategyName is already installed
- * and has an incompatible type
- * \return a reference to the strategy
- * \todo #3868 disallow args
- */
-template<typename S, typename ...Args>
-typename std::enable_if<std::is_base_of<fw::Strategy, S>::value, S&>::type
-choose(Forwarder& forwarder, const Name& prefix, Args&&... args)
-{
- S& strategy = install<S>(forwarder, std::forward<Args>(args)...);
- StrategyChoice& sc = forwarder.getStrategyChoice();
- sc.insert(prefix, strategy.getName());
- return dynamic_cast<S&>(sc.findEffectiveStrategy(prefix));
-}
-
-/** \brief install a strategy to forwarder, and choose the strategy as default
- * \tparam S strategy type
- * \param forwarder the forwarder
- * \throw std::bad_cast a strategy with duplicate strategyName is already installed
- * and has an incompatible type
- * \return a reference to the strategy
- * \todo #3868 merge into the other overload with default argument
- */
-template<typename S>
-typename std::enable_if<std::is_base_of<fw::Strategy, S>::value, S&>::type
-choose(Forwarder& forwarder)
-{
- return choose<S>(forwarder, "ndn:/");
-}
-
-} // namespace tests
-} // namespace nfd
-
-#endif // NFD_TESTS_DAEMON_FW_INSTALL_STRATEGY_HPP
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 2311ff7..d031bf9 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -37,7 +37,7 @@
#include "tests/test-common.hpp"
#include "tests/limited-io.hpp"
-#include "install-strategy.hpp"
+#include "choose-strategy.hpp"
#include "strategy-tester.hpp"
#include "tests/daemon/face/dummy-face.hpp"
#include <boost/mpl/copy_if.hpp>
diff --git a/tests/daemon/fw/strategy.t.cpp b/tests/daemon/fw/strategy.t.cpp
index 0ec85ca..0ac550a 100644
--- a/tests/daemon/fw/strategy.t.cpp
+++ b/tests/daemon/fw/strategy.t.cpp
@@ -46,7 +46,7 @@
public:
explicit
FaceTableAccessTestStrategy(Forwarder& forwarder)
- : DummyStrategy(forwarder, Name("ndn:/strategy"))
+ : DummyStrategy(forwarder)
{
this->afterAddFace.connect([this] (const Face& face) {
this->addedFaces.push_back(face.getId());
@@ -106,7 +106,7 @@
public:
explicit
TestStrategy(Forwarder& forwarder)
- : DummyStrategy(forwarder, Name("ndn:/strategy"))
+ : DummyStrategy(forwarder)
{
}
diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index e5b21da..ec122b6 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -33,7 +33,7 @@
#include "face/internal-transport.hpp"
#include "face/face.hpp"
#include "fw/strategy.hpp"
-#include "install-strategy.hpp"
+#include "choose-strategy.hpp"
#include "tests/test-common.hpp"
#include <ndn-cxx/face.hpp>