tests: replace Boost.MPL with Mp11
Change-Id: I2e8410f4acb7f25b5cb9d7846f05163414095cc7
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 392becb..8bd96d1 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.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 {
@@ -85,31 +85,15 @@
BOOST_AUTO_TEST_SUITE(TestStrategyScopeControl)
template<typename S, bool WillSendNackNoRoute, bool CanProcessNack, bool WillRejectPitEntry>
-class Test
+struct Test
{
-public:
using Strategy = S;
-
- static bool
- willRejectPitEntry()
- {
- return WillRejectPitEntry;
- }
-
- static bool
- willSendNackNoRoute()
- {
- return WillSendNackNoRoute;
- }
-
- static bool
- canProcessNack()
- {
- return CanProcessNack;
- }
+ static constexpr bool canProcessNack = CanProcessNack;
+ static constexpr bool willRejectPitEntry = WillRejectPitEntry;
+ static constexpr bool willSendNackNoRoute = WillSendNackNoRoute;
};
-using Tests = boost::mpl::vector<
+using Tests = boost::mp11::mp_list<
Test<AccessStrategy, false, false, true>,
Test<AsfStrategy, true, false, true>,
Test<BestRouteStrategy, true, true, true>,
@@ -148,11 +132,11 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3), pitEntry); },
- this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+ this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
- BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
- if (T::willSendNackNoRoute()) {
+ BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+ if (T::willSendNackNoRoute) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
}
@@ -191,11 +175,11 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->nonLocalFace1), pitEntry); },
- this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+ this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
- BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
- if (T::willSendNackNoRoute()) {
+ BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+ if (T::willSendNackNoRoute) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
}
@@ -237,11 +221,11 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
- this->limitedIo, T::canProcessNack()));
+ this->limitedIo, T::canProcessNack));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
- if (T::canProcessNack()) {
+ if (T::canProcessNack) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
}
@@ -262,11 +246,11 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
- this->limitedIo, T::canProcessNack()));
+ this->limitedIo, T::canProcessNack));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
- if (T::canProcessNack()) {
+ if (T::canProcessNack) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
}