diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index f07e72a..e80a287 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -114,11 +114,9 @@
   shared_ptr<TopologyAppLink> consumer;
   shared_ptr<TopologyAppLink> producer;
 
-  static const Name PRODUCER_PREFIX;
+  static inline const Name PRODUCER_PREFIX{"/hr/C"};
 };
 
-const Name AsfGridFixture::PRODUCER_PREFIX("/hr/C");
-
 class AsfStrategyParametersGridFixture : public AsfGridFixture
 {
 protected:
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index a091fb5..b928c92 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -274,26 +274,12 @@
   BOOST_CHECK_GT(nNacksD, 0);
 }
 
-template<lp::NackReason X, lp::NackReason Y, lp::NackReason R>
+template<auto X, auto Y, auto R>
 struct NackReasonCombination
 {
-  static lp::NackReason
-  getX()
-  {
-    return X;
-  }
-
-  static lp::NackReason
-  getY()
-  {
-    return Y;
-  }
-
-  static lp::NackReason
-  getExpectedResult()
-  {
-    return R;
-  }
+  static constexpr lp::NackReason firstReason{X};
+  static constexpr lp::NackReason secondReason{Y};
+  static constexpr lp::NackReason expectedResult{R};
 };
 
 using NackReasonCombinations = boost::mpl::vector<
@@ -320,24 +306,24 @@
                                  Combination, NackReasonCombinations,
                                  StrategyNackReturnFixture<BestRouteStrategy>)
 {
-  fib::Entry& fibEntry = *fib.insert(Name()).first;
+  auto& fibEntry = *fib.insert(Name()).first;
   fib.addOrUpdateNextHop(fibEntry, *face3, 10);
   fib.addOrUpdateNextHop(fibEntry, *face4, 20);
   fib.addOrUpdateNextHop(fibEntry, *face5, 30);
 
   auto interest1 = makeInterest("/F6sEwB24I", false, std::nullopt, 282);
-  shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
+  auto pitEntry = pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest1);
   pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
   pitEntry->insertOrUpdateOutRecord(*face4, *interest1);
 
-  lp::Nack nack3 = makeNack(*interest1, Combination::getX());
+  lp::Nack nack3 = makeNack(*interest1, Combination::firstReason);
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
   strategy.afterReceiveNack(nack3, FaceEndpoint(*face3, 0), pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0);
 
-  lp::Nack nack4 = makeNack(*interest1, Combination::getY());
+  lp::Nack nack4 = makeNack(*interest1, Combination::secondReason);
   pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
   strategy.afterReceiveNack(nack4, FaceEndpoint(*face4, 0), pitEntry);
 
@@ -345,7 +331,7 @@
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitInterest.wireEncode(),
                     pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].outFaceId, face1->getId());
-  BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].header.getReason(), Combination::getExpectedResult());
+  BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].header.getReason(), Combination::expectedResult);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestStrategyNackReturn
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 03c2f77..5391dde 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -91,7 +91,7 @@
       ++nActions;
     });
 
-    std::forward<F>(f)();
+    std::invoke(std::forward<F>(f));
 
     if (nActions < nExpectedActions) {
       // If strategy doesn't forward anything (e.g., decides not to forward an Interest), the number
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 73f9999..c44d61d 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -74,10 +74,7 @@
 TopologyLink::addFace(TopologyNode i, shared_ptr<Face> face)
 {
   auto receiveCb = [this, i] (const Block& packet) { transmit(i, packet); };
-
-  auto ret = m_transports.emplace(std::piecewise_construct,
-                                  std::forward_as_tuple(i),
-                                  std::forward_as_tuple(std::move(face), std::move(receiveCb)));
+  auto ret = m_transports.try_emplace(i, std::move(face), std::move(receiveCb));
   BOOST_ASSERT(ret.second);
 
   auto& node = ret.first->second;
@@ -93,12 +90,12 @@
 
   const auto& blockedDestinations = m_transports.at(i).blockedDestinations;
 
-  for (const auto& p : m_transports) {
-    if (p.first == i || blockedDestinations.count(p.first) > 0) {
+  for (const auto& [node, transport] : m_transports) {
+    if (node == i || blockedDestinations.count(node) > 0) {
       continue;
     }
 
-    getScheduler().schedule(m_delay, [packet, recipient = p.second.transport] {
+    getScheduler().schedule(m_delay, [packet, recipient = transport.transport] {
       recipient->receivePacket(packet);
     });
   }
diff --git a/tests/daemon/fw/unsolicited-data-policy.t.cpp b/tests/daemon/fw/unsolicited-data-policy.t.cpp
index 5c8c8ad..77722c7 100644
--- a/tests/daemon/fw/unsolicited-data-policy.t.cpp
+++ b/tests/daemon/fw/unsolicited-data-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -95,8 +95,8 @@
 struct FaceScopePolicyTest
 {
   using PolicyType = Policy;
-  using ShouldAdmitLocal = std::integral_constant<bool, shouldAdmitLocal>;
-  using ShouldAdmitNonLocal = std::integral_constant<bool, shouldAdmitNonLocal>;
+  using ShouldAdmitLocal = std::bool_constant<shouldAdmitLocal>;
+  using ShouldAdmitNonLocal = std::bool_constant<shouldAdmitNonLocal>;
 };
 
 using FaceScopePolicyTests = boost::mpl::vector<
