tests: replace Boost.MPL with Mp11
Change-Id: I2e8410f4acb7f25b5cb9d7846f05163414095cc7
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 3dfce2c..2e70e0e 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -39,7 +39,7 @@
#include "choose-strategy.hpp"
#include "strategy-tester.hpp"
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
namespace nfd::tests {
@@ -78,25 +78,16 @@
BOOST_AUTO_TEST_SUITE(Fw)
BOOST_AUTO_TEST_SUITE(TestStrategyNoRoute)
-template<typename S, typename C>
-class Test
-{
-public:
- using Strategy = S;
- using Case = C;
-};
-
template<typename S>
-class EmptyNextHopList
+struct EmptyNextHopList
{
-public:
- Name
+ static Name
getInterestName()
{
return "/P";
}
- void
+ static void
insertFibEntry(StrategyNoRouteFixture<S>* fixture)
{
fixture->fib.insert(Name());
@@ -104,16 +95,15 @@
};
template<typename S>
-class NextHopIsDownstream
+struct NextHopIsDownstream
{
-public:
- Name
+ static Name
getInterestName()
{
return "/P";
}
- void
+ static void
insertFibEntry(StrategyNoRouteFixture<S>* fixture)
{
fib::Entry* entry = fixture->fib.insert(Name()).first;
@@ -122,16 +112,15 @@
};
template<typename S>
-class NextHopViolatesScope
+struct NextHopViolatesScope
{
-public:
- Name
+ static Name
getInterestName()
{
return "/localhop/P";
}
- void
+ static void
insertFibEntry(StrategyNoRouteFixture<S>* fixture)
{
fib::Entry* entry = fixture->fib.insert("/localhop").first;
@@ -140,27 +129,27 @@
}
};
-using Tests = boost::mpl::vector<
- Test<AsfStrategy, EmptyNextHopList<AsfStrategy>>,
- Test<AsfStrategy, NextHopIsDownstream<AsfStrategy>>,
- Test<AsfStrategy, NextHopViolatesScope<AsfStrategy>>,
+using Tests = boost::mp11::mp_list<
+ boost::mp11::mp_list<AsfStrategy, EmptyNextHopList<AsfStrategy>>,
+ boost::mp11::mp_list<AsfStrategy, NextHopIsDownstream<AsfStrategy>>,
+ boost::mp11::mp_list<AsfStrategy, NextHopViolatesScope<AsfStrategy>>,
- Test<BestRouteStrategy, EmptyNextHopList<BestRouteStrategy>>,
- Test<BestRouteStrategy, NextHopIsDownstream<BestRouteStrategy>>,
- Test<BestRouteStrategy, NextHopViolatesScope<BestRouteStrategy>>,
+ boost::mp11::mp_list<BestRouteStrategy, EmptyNextHopList<BestRouteStrategy>>,
+ boost::mp11::mp_list<BestRouteStrategy, NextHopIsDownstream<BestRouteStrategy>>,
+ boost::mp11::mp_list<BestRouteStrategy, NextHopViolatesScope<BestRouteStrategy>>,
- Test<RandomStrategy, EmptyNextHopList<RandomStrategy>>,
- Test<RandomStrategy, NextHopIsDownstream<RandomStrategy>>,
- Test<RandomStrategy, NextHopViolatesScope<RandomStrategy>>
+ boost::mp11::mp_list<RandomStrategy, EmptyNextHopList<RandomStrategy>>,
+ boost::mp11::mp_list<RandomStrategy, NextHopIsDownstream<RandomStrategy>>,
+ boost::mp11::mp_list<RandomStrategy, NextHopViolatesScope<RandomStrategy>>
>;
BOOST_FIXTURE_TEST_CASE_TEMPLATE(IncomingInterest,
- T, Tests, StrategyNoRouteFixture<typename T::Strategy>)
+ T, Tests, StrategyNoRouteFixture<boost::mp11::mp_first<T>>)
{
- typename T::Case scenario;
- scenario.insertFibEntry(this);
+ using Scenario = boost::mp11::mp_second<T>;
+ Scenario::insertFibEntry(this);
- auto interest = makeInterest(scenario.getInterestName());
+ auto interest = makeInterest(Scenario::getInterestName());
auto pitEntry = this->pit.insert(*interest).first;
pitEntry->insertOrUpdateInRecord(*this->face1, *interest);