diff --git a/tests/core/algorithm.t.cpp b/tests/core/algorithm.t.cpp
index fb23238..89a60ba 100644
--- a/tests/core/algorithm.t.cpp
+++ b/tests/core/algorithm.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -34,24 +34,22 @@
 
 BOOST_AUTO_TEST_CASE(FindLastIf)
 {
-  std::vector<int> vec{1, 2, 3, 4, 5, 6, 7, 8, 9};
+  const std::vector<int> vec{1, 2, 3, 4, 5, 6, 7, 8, 9};
 
   int hit1 = 0;
-  std::vector<int>::const_iterator found1 = find_last_if(vec.begin(), vec.end(),
-      [&hit1] (int n) -> bool {
-        ++hit1;
-        return n % 2 == 0;
-      });
+  auto found1 = find_last_if(vec.begin(), vec.end(), [&hit1] (int n) -> bool {
+    ++hit1;
+    return n % 2 == 0;
+  });
   BOOST_REQUIRE(found1 != vec.end());
   BOOST_CHECK_EQUAL(*found1, 8);
   BOOST_CHECK_LE(hit1, vec.size());
 
   int hit2 = 0;
-  std::vector<int>::const_iterator found2 = find_last_if(vec.begin(), vec.end(),
-      [&hit2] (int n) -> bool {
-        ++hit2;
-        return n < 0;
-      });
+  auto found2 = find_last_if(vec.begin(), vec.end(), [&hit2] (int n) -> bool {
+    ++hit2;
+    return n < 0;
+  });
   BOOST_CHECK(found2 == vec.end());
   BOOST_CHECK_LE(hit2, vec.size());
 }
diff --git a/tests/core/version.t.cpp b/tests/core/version.t.cpp
index 6024f8c..349dfff 100644
--- a/tests/core/version.t.cpp
+++ b/tests/core/version.t.cpp
@@ -43,9 +43,9 @@
                             NFD_VERSION_MINOR * 1000 +
                             NFD_VERSION_PATCH);
 
-  static_assert(NFD_VERSION_MAJOR >= 22 && NFD_VERSION_MAJOR <= 100, "");
-  static_assert(NFD_VERSION_MINOR >= 1 && NFD_VERSION_MINOR <= 12, "");
-  static_assert(NFD_VERSION_PATCH < 1000, "");
+  static_assert(NFD_VERSION_MAJOR >= 22 && NFD_VERSION_MAJOR <= 100);
+  static_assert(NFD_VERSION_MINOR >= 1 && NFD_VERSION_MINOR <= 12);
+  static_assert(NFD_VERSION_PATCH < 1000);
 }
 
 BOOST_AUTO_TEST_CASE(VersionString)
diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 6d41a1f..631e394 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -56,7 +56,7 @@
   std::vector<uint8_t> readBuf(block1.size());
   this->remoteRead(readBuf);
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(readBuf.begin(), readBuf.end(), block1.begin(), block1.end());
+  BOOST_TEST(readBuf == block1, boost::test_tools::per_element());
   BOOST_CHECK_EQUAL(this->transport->getState(), TransportState::UP);
 }
 
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index 11aeeb8..e4f0425 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -229,8 +229,7 @@
 
   auto interest1 = makeInterest("/23Rd9hEiR");
   lp::Packet lpPacket;
-  lpPacket.set<lp::FragmentField>(std::make_pair(
-    interest1->wireEncode().begin(), interest1->wireEncode().end()));
+  lpPacket.set<lp::FragmentField>({interest1->wireEncode().begin(), interest1->wireEncode().end()});
   lpPacket.set<lp::SequenceField>(0); // force LpPacket encoding
 
   transport->receivePacket(lpPacket.wireEncode());
@@ -264,8 +263,7 @@
 
   auto data1 = makeData("/12345689");
   lp::Packet lpPacket;
-  lpPacket.set<lp::FragmentField>(std::make_pair(
-    data1->wireEncode().begin(), data1->wireEncode().end()));
+  lpPacket.set<lp::FragmentField>({data1->wireEncode().begin(), data1->wireEncode().end()});
   lpPacket.set<lp::SequenceField>(0); // force LpPacket encoding
 
   transport->receivePacket(lpPacket.wireEncode());
@@ -282,11 +280,11 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  lp::Nack nack1 = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 323),
-                            lp::NackReason::NO_ROUTE);
+  auto nack1 = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 323),
+                        lp::NackReason::NO_ROUTE);
   lp::Packet lpPacket;
-  lpPacket.set<lp::FragmentField>(std::make_pair(
-    nack1.getInterest().wireEncode().begin(), nack1.getInterest().wireEncode().end()));
+  lpPacket.set<lp::FragmentField>({nack1.getInterest().wireEncode().begin(),
+                                   nack1.getInterest().wireEncode().end()});
   lpPacket.set<lp::NackField>(nack1.getHeader());
 
   transport->receivePacket(lpPacket.wireEncode());
@@ -430,12 +428,9 @@
 
   // fragment the packet
   LpFragmenter fragmenter({});
-  size_t mtu = 100;
-  bool isOk = false;
-  std::vector<lp::Packet> frags;
-  std::tie(isOk, frags) = fragmenter.fragmentPacket(packet, mtu);
+  auto [isOk, frags] = fragmenter.fragmentPacket(packet, 100);
   BOOST_REQUIRE(isOk);
-  BOOST_CHECK_GT(frags.size(), 1);
+  BOOST_TEST(frags.size() > 1);
 
   // receive the fragments
   for (ssize_t fragIndex = frags.size() - 1; fragIndex >= 0; --fragIndex) {
@@ -970,11 +965,11 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
-                           lp::NackReason::NO_ROUTE);
+  auto nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
+                       lp::NackReason::NO_ROUTE);
   lp::Packet packet;
-  packet.set<lp::FragmentField>(std::make_pair(
-    nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
+  packet.set<lp::FragmentField>({nack.getInterest().wireEncode().begin(),
+                                 nack.getInterest().wireEncode().end()});
   packet.set<lp::NackField>(nack.getHeader());
   packet.set<lp::NextHopFaceIdField>(1000);
 
@@ -1205,11 +1200,11 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveCongestionMarkNack)
 {
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
-                           lp::NackReason::NO_ROUTE);
+  auto nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
+                       lp::NackReason::NO_ROUTE);
   lp::Packet packet;
-  packet.set<lp::FragmentField>(std::make_pair(
-    nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
+  packet.set<lp::FragmentField>({nack.getInterest().wireEncode().begin(),
+                                 nack.getInterest().wireEncode().end()});
   packet.set<lp::NackField>(nack.getHeader());
   packet.set<lp::CongestionMarkField>(1);
 
@@ -1310,11 +1305,11 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
-                           lp::NackReason::NO_ROUTE);
+  auto nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
+                       lp::NackReason::NO_ROUTE);
   lp::Packet packet;
-  packet.set<lp::FragmentField>(std::make_pair(
-    nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
+  packet.set<lp::FragmentField>({nack.getInterest().wireEncode().begin(),
+                                 nack.getInterest().wireEncode().end()});
   packet.set<lp::NackField>(nack.getHeader());
   packet.set<lp::NonDiscoveryField>(lp::EmptyValue{});
 
@@ -1418,11 +1413,11 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
-                           lp::NackReason::NO_ROUTE);
+  auto nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
+                       lp::NackReason::NO_ROUTE);
   lp::Packet packet;
-  packet.set<lp::FragmentField>(std::make_pair(
-    nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
+  packet.set<lp::FragmentField>({nack.getInterest().wireEncode().begin(),
+                                 nack.getInterest().wireEncode().end()});
   packet.set<lp::NackField>(nack.getHeader());
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   packet.set<lp::PrefixAnnouncementField>(pah);
diff --git a/tests/daemon/face/lp-fragmenter.t.cpp b/tests/daemon/face/lp-fragmenter.t.cpp
index 30eb8e9..8bd48c2 100644
--- a/tests/daemon/face/lp-fragmenter.t.cpp
+++ b/tests/daemon/face/lp-fragmenter.t.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,
@@ -52,9 +52,7 @@
   auto data = makeData("/test/data123");
   packet.add<lp::FragmentField>({data->wireEncode().begin(), data->wireEncode().end()});
 
-  bool isOk = false;
-  std::vector<lp::Packet> frags;
-  std::tie(isOk, frags) = fragmenter.fragmentPacket(packet, mtu);
+  auto [isOk, frags] = fragmenter.fragmentPacket(packet, mtu);
   BOOST_REQUIRE(isOk);
   BOOST_REQUIRE_EQUAL(frags.size(), 1);
 
@@ -64,8 +62,7 @@
   BOOST_CHECK(!frags[0].has<lp::FragCountField>());
   BOOST_CHECK_LE(frags[0].wireEncode().size(), mtu);
 
-  ndn::Buffer::const_iterator fragBegin, fragEnd;
-  std::tie(fragBegin, fragEnd) = frags[0].get<lp::FragmentField>();
+  auto [fragBegin, fragEnd] = frags[0].get<lp::FragmentField>();
   BOOST_CHECK_EQUAL_COLLECTIONS(data->wireEncode().begin(), data->wireEncode().end(),
                                 fragBegin, fragEnd);
 }
@@ -80,9 +77,7 @@
   auto data = makeData("/test/data123/123456789/987654321/123456789");
   packet.add<lp::FragmentField>({data->wireEncode().begin(), data->wireEncode().end()});
 
-  bool isOk = false;
-  std::vector<lp::Packet> frags;
-  std::tie(isOk, frags) = fragmenter.fragmentPacket(packet, mtu);
+  auto [isOk, frags] = fragmenter.fragmentPacket(packet, mtu);
   BOOST_REQUIRE(isOk);
   BOOST_REQUIRE_EQUAL(frags.size(), 5);
 
@@ -93,8 +88,7 @@
   BOOST_CHECK_EQUAL(frags[0].get<lp::FragIndexField>(), 0);
   BOOST_CHECK_EQUAL(frags[0].get<lp::FragCountField>(), 5);
   BOOST_CHECK_LE(frags[0].wireEncode().size(), mtu);
-  ndn::Buffer::const_iterator frag0Begin, frag0End;
-  std::tie(frag0Begin, frag0End) = frags[0].get<lp::FragmentField>();
+  auto [frag0Begin, frag0End] = frags[0].get<lp::FragmentField>();
   BOOST_REQUIRE_LE(std::distance(frag0Begin, frag0End), reassembledPayload.size());
   auto reassembledPos = std::copy(frag0Begin, frag0End, reassembledPayload.begin());
 
@@ -103,8 +97,7 @@
   BOOST_CHECK_EQUAL(frags[1].get<lp::FragIndexField>(), 1);
   BOOST_CHECK_EQUAL(frags[1].get<lp::FragCountField>(), 5);
   BOOST_CHECK_LE(frags[1].wireEncode().size(), mtu);
-  ndn::Buffer::const_iterator frag1Begin, frag1End;
-  std::tie(frag1Begin, frag1End) = frags[1].get<lp::FragmentField>();
+  auto [frag1Begin, frag1End] = frags[1].get<lp::FragmentField>();
   BOOST_REQUIRE_LE(std::distance(frag1Begin, frag1End),
                    std::distance(reassembledPos, reassembledPayload.end()));
   reassembledPos = std::copy(frag1Begin, frag1End, reassembledPos);
@@ -114,8 +107,7 @@
   BOOST_CHECK_EQUAL(frags[2].get<lp::FragIndexField>(), 2);
   BOOST_CHECK_EQUAL(frags[2].get<lp::FragCountField>(), 5);
   BOOST_CHECK_LE(frags[2].wireEncode().size(), mtu);
-  ndn::Buffer::const_iterator frag2Begin, frag2End;
-  std::tie(frag2Begin, frag2End) = frags[2].get<lp::FragmentField>();
+  auto [frag2Begin, frag2End] = frags[2].get<lp::FragmentField>();
   BOOST_REQUIRE_LE(std::distance(frag2Begin, frag2End),
                    std::distance(reassembledPos, reassembledPayload.end()));
   reassembledPos = std::copy(frag2Begin, frag2End, reassembledPos);
@@ -125,8 +117,7 @@
   BOOST_CHECK_EQUAL(frags[3].get<lp::FragIndexField>(), 3);
   BOOST_CHECK_EQUAL(frags[3].get<lp::FragCountField>(), 5);
   BOOST_CHECK_LE(frags[3].wireEncode().size(), mtu);
-  ndn::Buffer::const_iterator frag3Begin, frag3End;
-  std::tie(frag3Begin, frag3End) = frags[3].get<lp::FragmentField>();
+  auto [frag3Begin, frag3End] = frags[3].get<lp::FragmentField>();
   BOOST_REQUIRE_LE(std::distance(frag3Begin, frag3End),
                    std::distance(reassembledPos, reassembledPayload.end()));
   reassembledPos = std::copy(frag3Begin, frag3End, reassembledPos);
@@ -136,14 +127,12 @@
   BOOST_CHECK_EQUAL(frags[4].get<lp::FragIndexField>(), 4);
   BOOST_CHECK_EQUAL(frags[4].get<lp::FragCountField>(), 5);
   BOOST_CHECK_LE(frags[4].wireEncode().size(), mtu);
-  ndn::Buffer::const_iterator frag4Begin, frag4End;
-  std::tie(frag4Begin, frag4End) = frags[4].get<lp::FragmentField>();
+  auto [frag4Begin, frag4End] = frags[4].get<lp::FragmentField>();
   BOOST_REQUIRE_LE(std::distance(frag4Begin, frag4End),
                    std::distance(reassembledPos, reassembledPayload.end()));
   std::copy(frag4Begin, frag4End, reassembledPos);
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(data->wireEncode().begin(), data->wireEncode().end(),
-                                reassembledPayload.begin(), reassembledPayload.end());
+  BOOST_TEST(data->wireEncode() == reassembledPayload, boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_CASE(MtuTooSmall)
diff --git a/tests/daemon/face/lp-reliability.t.cpp b/tests/daemon/face/lp-reliability.t.cpp
index 526708f..0d891e0 100644
--- a/tests/daemon/face/lp-reliability.t.cpp
+++ b/tests/daemon/face/lp-reliability.t.cpp
@@ -140,8 +140,7 @@
   getPktNum(const lp::Packet& pkt)
   {
     BOOST_REQUIRE(pkt.has<lp::FragmentField>());
-    ndn::Buffer::const_iterator begin, end;
-    std::tie(begin, end) = pkt.get<lp::FragmentField>();
+    auto [begin, end] = pkt.get<lp::FragmentField>();
     if (std::distance(begin, end) < 4) {
       return 0;
     }
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index 1ad0b70..c01aaef 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -187,14 +187,14 @@
   // measure retry intervals
   auto retryTime1 = time::steady_clock::now();
 
-  auto expectedWait1 = TcpTransport::s_initialReconnectWait;
+  auto expectedWait1 = TcpTransport::INITIAL_RECONNECT_DELAY;
   BOOST_REQUIRE_EQUAL(this->limitedIo.run(2, expectedWait1 + 1_s), // add some slack
                       LimitedIo::EXCEED_OPS);
   auto retryTime2 = time::steady_clock::now();
   BOOST_CHECK_EQUAL(transportObserver->getState(), TransportState::DOWN);
 
   auto expectedWait2 = time::duration_cast<time::nanoseconds>(expectedWait1 *
-                                                              TcpTransport::s_reconnectWaitMultiplier);
+                                                              TcpTransport::RECONNECT_DELAY_MULTIPLIER);
   BOOST_REQUIRE_EQUAL(this->limitedIo.run(2, expectedWait2 + 1_s), // add some slack
                       LimitedIo::EXCEED_OPS);
   auto retryTime3 = time::steady_clock::now();
@@ -210,7 +210,7 @@
   this->startAccept(remoteEp);
 
   auto expectedWait3 = time::duration_cast<time::nanoseconds>(expectedWait2 *
-                                                              TcpTransport::s_reconnectWaitMultiplier);
+                                                              TcpTransport::RECONNECT_DELAY_MULTIPLIER);
   BOOST_REQUIRE_EQUAL(this->limitedIo.run(3, // reconnect, handleReconnect, async_accept
                                           expectedWait3 + 1_s), LimitedIo::EXCEED_OPS);
   BOOST_CHECK_EQUAL(transportObserver->getState(), TransportState::UP);
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index e5962db..24d47fd 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -162,7 +162,7 @@
     });
   BOOST_REQUIRE_EQUAL(limitedIo.run(1, 1_s), LimitedIo::EXCEED_OPS);
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(readBuf.begin(), readBuf.end(), block1.begin(), block1.end());
+  BOOST_TEST(readBuf == block1, boost::test_tools::per_element());
 
   Block block2 = ndn::encoding::makeStringBlock(301, "world");
   ndn::Buffer buf(block2.begin(), block2.end());
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<
diff --git a/tests/daemon/limited-io.cpp b/tests/daemon/limited-io.cpp
index aeb1ea7..c7e9b1b 100644
--- a/tests/daemon/limited-io.cpp
+++ b/tests/daemon/limited-io.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -32,9 +32,6 @@
 namespace nfd {
 namespace tests {
 
-const int LimitedIo::UNLIMITED_OPS = std::numeric_limits<int>::max();
-const time::nanoseconds LimitedIo::UNLIMITED_TIME = time::nanoseconds::min();
-
 LimitedIo::LimitedIo(GlobalIoTimeFixture* fixture)
   : m_fixture(fixture)
 {
diff --git a/tests/daemon/limited-io.hpp b/tests/daemon/limited-io.hpp
index a34d20e..efa35c9 100644
--- a/tests/daemon/limited-io.hpp
+++ b/tests/daemon/limited-io.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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 @@
   afterTimeout();
 
 public:
-  static const int UNLIMITED_OPS;
-  static const time::nanoseconds UNLIMITED_TIME;
+  static constexpr int UNLIMITED_OPS = std::numeric_limits<int>::max();
+  static constexpr time::nanoseconds UNLIMITED_TIME = time::nanoseconds::min();
 
 private:
   GlobalIoTimeFixture* m_fixture;
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 6131670..544eda5 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -438,8 +438,7 @@
   }
 
   BOOST_CHECK_EQUAL(actualPrefixes.size(), 0);
-  BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
-                                expectedRecords.begin(), expectedRecords.end());
+  BOOST_TEST(receivedRecords == expectedRecords, boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // List
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/daemon/mgmt/manager-common-fixture.cpp
index 83136be..3188ee4 100644
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ b/tests/daemon/mgmt/manager-common-fixture.cpp
@@ -28,8 +28,6 @@
 namespace nfd {
 namespace tests {
 
-const Name CommandInterestSignerFixture::DEFAULT_COMMAND_SIGNER_IDENTITY("/CommandInterestSignerFixture-identity");
-
 CommandInterestSignerFixture::CommandInterestSignerFixture()
   : m_signer(m_keyChain)
 {
diff --git a/tests/daemon/mgmt/manager-common-fixture.hpp b/tests/daemon/mgmt/manager-common-fixture.hpp
index e717172..005d456 100644
--- a/tests/daemon/mgmt/manager-common-fixture.hpp
+++ b/tests/daemon/mgmt/manager-common-fixture.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,
@@ -65,7 +65,7 @@
                             const Name& identity = DEFAULT_COMMAND_SIGNER_IDENTITY);
 
 protected:
-  static const Name DEFAULT_COMMAND_SIGNER_IDENTITY;
+  static inline const Name DEFAULT_COMMAND_SIGNER_IDENTITY{"/CommandInterestSignerFixture-identity"};
 
 private:
   ndn::security::InterestSigner m_signer;
@@ -188,7 +188,7 @@
   }
 };
 
-template<int CODE>
+template<auto CODE>
 class CommandFailure
 {
 public:
diff --git a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
index 4d15659..ebfe7d0 100644
--- a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
+++ b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
@@ -274,7 +274,7 @@
 
 BOOST_AUTO_TEST_CASE(AnnounceExpired)
 {
-  auto pa = makeTrustedAnn("/awrVv6V7", 1_h, std::make_pair(-3_h, -1_h));
+  auto pa = makeTrustedAnn("/awrVv6V7", 1_h, std::pair(-3_h, -1_h));
   BOOST_CHECK_EQUAL(slAnnounceSync(pa, 9087, 1_h), SlAnnounceResult::EXPIRED);
 
   BOOST_CHECK(findAnnRoute("/awrVv6V7", 9087) == nullptr);
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index 682eb30..be4638f 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -494,8 +494,7 @@
   }
 
   BOOST_CHECK_EQUAL(actualPrefixes.size(), 0);
-  BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
-                                expectedRecords.begin(), expectedRecords.end());
+  BOOST_TEST(receivedRecords == expectedRecords, boost::test_tools::per_element());
 }
 
 BOOST_FIXTURE_TEST_SUITE(FaceMonitor, LocalhostAuthorizedRibManagerFixture)
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 7fdd8fa..3e42d1c 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.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,
@@ -62,12 +62,8 @@
   Name
   getInstanceName(const Name& name) const
   {
-    bool hasEntry = false;
-    Name instanceName;
-    std::tie(hasEntry, instanceName) = sc.get(name);
-    return hasEntry ?
-           instanceName :
-           Name("/no-StrategyChoice-entry-at").append(name);
+    auto [hasEntry, instanceName] = sc.get(name);
+    return hasEntry ? instanceName : Name("/no-StrategyChoice-entry-at").append(name);
   }
 
 protected:
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index 8916c00..ffcab71 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -220,11 +220,10 @@
   this->setDestinationAvailability(true);
   std::set<Name> advertisedPrefixes;
   boost::copy(destination->advertiseHistory | boost::adaptors::transformed(
-                [] (const DummyReadvertiseDestination::HistoryEntry& he) { return he.prefix; }),
+                [] (const auto& he) { return he.prefix; }),
               std::inserter(advertisedPrefixes, advertisedPrefixes.end()));
-  std::set<Name> expectedPrefixes{"/A", "/B"};
-  BOOST_CHECK_EQUAL_COLLECTIONS(advertisedPrefixes.begin(), advertisedPrefixes.end(),
-                                expectedPrefixes.begin(), expectedPrefixes.end());
+  const std::set<Name> expectedPrefixes{"/A", "/B"};
+  BOOST_TEST(advertisedPrefixes == expectedPrefixes, boost::test_tools::per_element());
   destination->advertiseHistory.clear();
 
   this->setDestinationAvailability(false);
diff --git a/tests/daemon/rib/rib-update.t.cpp b/tests/daemon/rib/rib-update.t.cpp
index 81ee10e..90c80f0 100644
--- a/tests/daemon/rib/rib-update.t.cpp
+++ b/tests/daemon/rib/rib-update.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -27,25 +27,20 @@
 #include "rib/rib-update-batch.hpp"
 
 #include "tests/test-common.hpp"
-#include "tests/daemon/global-io-fixture.hpp"
 #include "tests/daemon/rib/create-route.hpp"
 
 namespace nfd {
 namespace rib {
 namespace tests {
 
-using namespace nfd::tests;
-
-BOOST_FIXTURE_TEST_SUITE(TestRibUpdate, GlobalIoFixture)
+BOOST_AUTO_TEST_SUITE(TestRibUpdate)
 
 BOOST_AUTO_TEST_CASE(BatchBasic)
 {
   const uint64_t faceId = 1;
-
   RibUpdateBatch batch(faceId);
 
   Route routeRegister = createRoute(faceId, 128, 10, ndn::nfd::ROUTE_FLAG_CHILD_INHERIT);
-
   RibUpdate registerUpdate;
   registerUpdate.setAction(RibUpdate::REGISTER)
                 .setName("/a")
@@ -56,7 +51,6 @@
   BOOST_CHECK_EQUAL(batch.getFaceId(), faceId);
 
   Route routeUnregister = createRoute(faceId, 0, 0, ndn::nfd::ROUTE_FLAG_CAPTURE);
-
   RibUpdate unregisterUpdate;
   unregisterUpdate.setAction(RibUpdate::UNREGISTER)
                   .setName("/a/b")
@@ -65,7 +59,7 @@
   batch.add(unregisterUpdate);
 
   BOOST_REQUIRE_EQUAL(batch.size(), 2);
-  RibUpdateBatch::const_iterator it = batch.begin();
+  auto it = batch.begin();
 
   BOOST_CHECK_EQUAL(it->getAction(), RibUpdate::REGISTER);
   BOOST_CHECK_EQUAL(it->getName(), "/a");
diff --git a/tests/daemon/table/cs.t.cpp b/tests/daemon/table/cs.t.cpp
index 85886da..b8e34de 100644
--- a/tests/daemon/table/cs.t.cpp
+++ b/tests/daemon/table/cs.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -264,12 +264,12 @@
   insert(12, nameAB);
   insert(4, nameD);
 
-  std::set<Name> expected = {nameA, nameAB, nameABC, nameD};
+  const std::set<Name> expected{nameA, nameAB, nameABC, nameD};
   std::set<Name> actual;
   for (const auto& csEntry : cs) {
     actual.insert(csEntry.getName());
   }
-  BOOST_CHECK_EQUAL_COLLECTIONS(actual.begin(), actual.end(), expected.begin(), expected.end());
+  BOOST_TEST(actual == expected, boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestCs
diff --git a/tests/daemon/table/dead-nonce-list.t.cpp b/tests/daemon/table/dead-nonce-list.t.cpp
index b4bcec9..44b0bfd 100644
--- a/tests/daemon/table/dead-nonce-list.t.cpp
+++ b/tests/daemon/table/dead-nonce-list.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,
@@ -145,9 +145,6 @@
   scheduler::ScopedEventId addNonceEvent;
 };
 
-const time::nanoseconds PeriodicalInsertionFixture::LIFETIME;
-const time::nanoseconds PeriodicalInsertionFixture::ADD_INTERVAL;
-
 BOOST_FIXTURE_TEST_CASE(Lifetime, PeriodicalInsertionFixture)
 {
   BOOST_CHECK_EQUAL(dnl.getLifetime(), LIFETIME);
diff --git a/tests/daemon/table/fib.t.cpp b/tests/daemon/table/fib.t.cpp
index 101b3b9..1655fac 100644
--- a/tests/daemon/table/fib.t.cpp
+++ b/tests/daemon/table/fib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -92,7 +92,7 @@
   // [(face1,30), (face2,40)]
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 2);
   {
-    NextHopList::const_iterator it = entry.getNextHops().begin();
+    auto it = entry.getNextHops().begin();
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
     BOOST_CHECK_EQUAL(it->getCost(), 30);
@@ -112,7 +112,7 @@
   // [(face2,10), (face1,30)]
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 2);
   {
-    NextHopList::const_iterator it = entry.getNextHops().begin();
+    auto it = entry.getNextHops().begin();
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
     BOOST_CHECK_EQUAL(it->getCost(), 10);
diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index 2649834..6c410aa 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.t.cpp
@@ -56,6 +56,7 @@
 }
 
 BOOST_AUTO_TEST_SUITE(Hashtable)
+
 using name_tree::Hashtable;
 
 BOOST_AUTO_TEST_CASE(Modifiers)
@@ -256,7 +257,7 @@
   npe.insertPitEntry(pit2);
   BOOST_CHECK_EQUAL(npe.getPitEntries().size(), 2);
 
-  pit::Entry* pit1ptr = pit1.get();
+  auto* pit1ptr = pit1.get();
   weak_ptr<pit::Entry> pit1weak(pit1);
   pit1.reset();
   BOOST_CHECK_EQUAL(pit1weak.use_count(), 1); // npe is the sole owner of pit1
@@ -338,7 +339,6 @@
   Entry* npe0 = nt.findExactMatch(name0);
   BOOST_CHECK(npe0 == nullptr);
 
-
   // findLongestPrefixMatch
 
   Entry* temp = nullptr;
@@ -493,12 +493,10 @@
   }
 
 protected:
-  static const size_t N_BUCKETS = 16;
+  static constexpr size_t N_BUCKETS = 16;
   NameTree nt;
 };
 
-const size_t EnumerationFixture::N_BUCKETS;
-
 BOOST_FIXTURE_TEST_CASE(IteratorFullEnumerate, EnumerationFixture)
 {
   nt.lookup("/a/b/c");
@@ -556,7 +554,7 @@
 
   // Accept "root" nameA only
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-    return std::make_pair(entry.getName() == "/a", true);
+    return std::pair(entry.getName() == "/a", true);
   });
 
   EnumerationVerifier(enumerable)
@@ -570,7 +568,7 @@
 
   // Accept anything except "root" nameA
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-    return std::make_pair(entry.getName() != "/a", true);
+    return std::pair(entry.getName() != "/a", true);
   });
 
   EnumerationVerifier(enumerable)
@@ -586,7 +584,7 @@
   // No NameA
   // No SubTree from NameAB
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(entry.getName() != "/a", entry.getName() != "/a/b");
+      return std::pair(entry.getName() != "/a", entry.getName() != "/a/b");
     });
 
   EnumerationVerifier(enumerable)
@@ -604,7 +602,7 @@
   // No NameA
   // No SubTree from NameAC
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(entry.getName() != "/a", entry.getName() != "/a/c");
+      return std::pair(entry.getName() != "/a", entry.getName() != "/a/c");
     });
 
   EnumerationVerifier(enumerable)
@@ -621,7 +619,7 @@
 
   // No Subtree from NameA
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(true, entry.getName() != "/a");
+      return std::pair(true, entry.getName() != "/a");
     });
 
   EnumerationVerifier(enumerable)
@@ -647,23 +645,20 @@
   nt.lookup("/E");
   nt.lookup("/F");
 
-  auto&& enumerable = nt.partialEnumerate("/A",
-    [] (const Entry& entry) {
-      bool visitEntry = false;
-      bool visitChildren = false;
+  auto&& enumerable = nt.partialEnumerate("/A", [] (const Entry& entry) {
+    bool visitEntry = false;
+    bool visitChildren = false;
 
-      Name name = entry.getName();
+    const Name& name = entry.getName();
+    if (name == "/" || name == "/A/B" || name == "/A/B/C" || name == "/A/D") {
+      visitEntry = true;
+    }
+    if (name == "/" || name == "/A" || name == "/F") {
+      visitChildren = true;
+    }
 
-      if (name == "/" || name == "/A/B" || name == "/A/B/C" || name == "/A/D") {
-        visitEntry = true;
-      }
-
-      if (name == "/" || name == "/A" || name == "/F") {
-        visitChildren = true;
-      }
-
-      return std::make_pair(visitEntry, visitChildren);
-    });
+    return std::pair(visitEntry, visitChildren);
+  });
 
   EnumerationVerifier(enumerable)
     .expect("/A/B")
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index 03438d4..defa768 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -336,9 +336,9 @@
   for (const auto& pitEntry : pit) {
     actual.insert(&pitEntry.getInterest());
   }
-  std::set<const Interest*> expected = {interestA.get(), interestABC1.get(),
-                                        interestABC2.get(), interestD.get()};
-  BOOST_CHECK_EQUAL_COLLECTIONS(actual.begin(), actual.end(), expected.begin(), expected.end());
+  const auto expected = std::set{interestA.get(), interestABC1.get(),
+                                 interestABC2.get(), interestD.get()};
+  BOOST_TEST(actual == expected, boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestPit
diff --git a/tests/daemon/table/strategy-choice.t.cpp b/tests/daemon/table/strategy-choice.t.cpp
index d99ff44..ff6b754 100644
--- a/tests/daemon/table/strategy-choice.t.cpp
+++ b/tests/daemon/table/strategy-choice.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,
@@ -48,9 +48,7 @@
   insertAndGet(const Name& prefix, const Name& instanceName)
   {
     BOOST_REQUIRE(sc.insert(prefix, instanceName));
-    bool isFound;
-    Name foundName;
-    std::tie(isFound, foundName) = sc.get(prefix);
+    auto [isFound, foundName] = sc.get(prefix);
     BOOST_REQUIRE(isFound);
     return foundName;
   }
diff --git a/tests/daemon/table/strategy-info-host.t.cpp b/tests/daemon/table/strategy-info-host.t.cpp
index 2a3a33e..e4323e4 100644
--- a/tests/daemon/table/strategy-info-host.t.cpp
+++ b/tests/daemon/table/strategy-info-host.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -50,8 +50,7 @@
     ++g_DummyStrategyInfo_count;
   }
 
-  virtual
-  ~DummyStrategyInfo()
+  ~DummyStrategyInfo() override
   {
     --g_DummyStrategyInfo_count;
   }
@@ -85,19 +84,16 @@
 {
   StrategyInfoHost host;
   g_DummyStrategyInfo_count = 0;
-  bool isNew = false;
 
-  DummyStrategyInfo* info = nullptr;
-  std::tie(info, isNew) = host.insertStrategyInfo<DummyStrategyInfo>(3503);
+  auto [info, isNew] = host.insertStrategyInfo<DummyStrategyInfo>(3503);
   BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(g_DummyStrategyInfo_count, 1);
   BOOST_REQUIRE(info != nullptr);
   BOOST_CHECK_EQUAL(info->m_id, 3503);
   BOOST_CHECK_EQUAL(host.getStrategyInfo<DummyStrategyInfo>(), info);
 
-  DummyStrategyInfo* info2 = nullptr;
-  std::tie(info2, isNew) = host.insertStrategyInfo<DummyStrategyInfo>(1032);
-  BOOST_CHECK_EQUAL(isNew, false);
+  auto [info2, isNew2] = host.insertStrategyInfo<DummyStrategyInfo>(1032);
+  BOOST_CHECK_EQUAL(isNew2, false);
   BOOST_CHECK_EQUAL(g_DummyStrategyInfo_count, 1);
   BOOST_CHECK_EQUAL(info2, info);
   BOOST_CHECK_EQUAL(info->m_id, 3503);
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 1ed2143..0b809c6 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.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,
@@ -102,14 +102,14 @@
 
     // find a matching right uri
     FaceUri uriR;
-    for (const auto& pair : m_faceUris) {
-      if (pair.first.getHost() == faceL->getRemoteUri().getHost() &&
-          pair.first.getScheme() == faceL->getRemoteUri().getScheme()) {
-        uriR = pair.second;
+    for (const auto& [first, second] : m_faceUris) {
+      if (first.getHost() == faceL->getRemoteUri().getHost() &&
+          first.getScheme() == faceL->getRemoteUri().getScheme()) {
+        uriR = second;
       }
-      else if (pair.second.getHost() == faceL->getRemoteUri().getHost() &&
-               pair.second.getScheme() == faceL->getRemoteUri().getScheme()) {
-        uriR = pair.first;
+      else if (second.getHost() == faceL->getRemoteUri().getHost() &&
+               second.getScheme() == faceL->getRemoteUri().getScheme()) {
+        uriR = first;
       }
     }
 
@@ -124,17 +124,17 @@
     auto port = boost::lexical_cast<uint16_t>(uriR.getPort());
     if (uriR.getScheme() == "tcp4") {
       m_tcpChannel.connect(tcp::Endpoint(addr, port), {},
-                           std::bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
+                           std::bind(&FaceBenchmark::onRightFaceCreated, faceL, _1),
                            std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     }
     else if (uriR.getScheme() == "udp4") {
       m_udpChannel.connect(udp::Endpoint(addr, port), {},
-                           std::bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
+                           std::bind(&FaceBenchmark::onRightFaceCreated, faceL, _1),
                            std::bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
     }
   }
 
-  void
+  static void
   onRightFaceCreated(const shared_ptr<Face>& faceL, const shared_ptr<Face>& faceR)
   {
     std::clog << "Right face created: remote=" << faceR->getRemoteUri()
@@ -147,18 +147,18 @@
   static void
   tieFaces(const shared_ptr<Face>& face1, const shared_ptr<Face>& face2)
   {
-    face1->afterReceiveInterest.connect([face2] (const Interest& interest, const EndpointId&) {
+    face1->afterReceiveInterest.connect([face2] (const auto& interest, const EndpointId&) {
       face2->sendInterest(interest);
     });
-    face1->afterReceiveData.connect([face2] (const Data& data, const EndpointId&) {
+    face1->afterReceiveData.connect([face2] (const auto& data, const EndpointId&) {
       face2->sendData(data);
     });
-    face1->afterReceiveNack.connect([face2] (const ndn::lp::Nack& nack, const EndpointId&) {
+    face1->afterReceiveNack.connect([face2] (const auto& nack, const EndpointId&) {
       face2->sendNack(nack);
     });
   }
 
-  static void
+  [[noreturn]] static void
   onFaceCreationFailed(uint32_t status, const std::string& reason)
   {
     NDN_THROW(std::runtime_error("Failed to create face: [" + to_string(status) + "] " + reason));
diff --git a/tests/tools/nfdc/command-definition.t.cpp b/tests/tools/nfdc/command-definition.t.cpp
index 777a554..7dbbbf6 100644
--- a/tests/tools/nfdc/command-definition.t.cpp
+++ b/tests/tools/nfdc/command-definition.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  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,
@@ -24,6 +24,7 @@
  */
 
 #include "nfdc/command-definition.hpp"
+#include "nfdc/status-report.hpp"
 
 #include "tests/test-common.hpp"
 
diff --git a/tests/tools/nfdc/execute-command-fixture.hpp b/tests/tools/nfdc/execute-command-fixture.hpp
index 1acadd0..103c50e 100644
--- a/tests/tools/nfdc/execute-command-fixture.hpp
+++ b/tests/tools/nfdc/execute-command-fixture.hpp
@@ -51,15 +51,11 @@
 
     CommandParser parser;
     registerCommands(parser);
-
-    std::string noun, verb;
-    CommandArguments ca;
-    ExecuteCommand execute;
-    std::tie(noun, verb, ca, execute) = parser.parse(args, ParseMode::ONE_SHOT);
+    auto [noun, verb, ca, exec] = parser.parse(args, ParseMode::ONE_SHOT);
 
     Controller controller(face, m_keyChain);
     ExecuteContext ctx{noun, verb, ca, 0, out, err, face, m_keyChain, controller};
-    execute(ctx);
+    exec(ctx);
     exitCode = ctx.exitCode;
   }
 
