diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index b1231dc..741ee03 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2023, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -99,7 +99,7 @@
   Consumer cons(security::getAcceptAllValidator(), output);
 
   auto interest = makeInterest(name, true);
-  std::vector<shared_ptr<Data>> dataStore;
+  std::vector<std::shared_ptr<Data>> dataStore;
 
   for (size_t i = 0; i < testStrings.size(); ++i) {
     auto data = makeData(Name(name).appendVersion(1).appendSegment(i));
@@ -153,8 +153,8 @@
   Consumer consumer(security::getAcceptAllValidator());
 
   Name prefix = Name("/ndn/chunks/test").appendVersion(1);
-  auto discover = make_unique<DiscoverVersion>(face, prefix, options);
-  auto pipeline = make_unique<PipelineInterestsDummy>(face, options);
+  auto discover = std::make_unique<DiscoverVersion>(face, prefix, options);
+  auto pipeline = std::make_unique<PipelineInterestsDummy>(face, options);
   auto pipelinePtr = pipeline.get();
 
   BOOST_CHECK_EQUAL(pipelinePtr->isPipelineRunning, false);
diff --git a/tests/chunks/discover-version.t.cpp b/tests/chunks/discover-version.t.cpp
index 01e360e..6b429b8 100644
--- a/tests/chunks/discover-version.t.cpp
+++ b/tests/chunks/discover-version.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2023, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -42,7 +42,7 @@
   void
   run(const Name& prefix)
   {
-    discover = make_unique<DiscoverVersion>(face, prefix, opt);
+    discover = std::make_unique<DiscoverVersion>(face, prefix, opt);
     discover->onDiscoverySuccess.connect([this] (const Name& versionedName) {
       isDiscoveryFinished = true;
       discoveredName = versionedName;
@@ -62,7 +62,7 @@
   const uint64_t version = 1449227841747;
   DummyClientFace face{m_io};
   Options opt;
-  unique_ptr<DiscoverVersion> discover;
+  std::unique_ptr<DiscoverVersion> discover;
   std::optional<Name> discoveredName;
   std::optional<uint64_t> discoveredVersion;
   bool isDiscoveryFinished = false;
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index 12eeaa5..4688ee4 100644
--- a/tests/chunks/pipeline-interests-aimd.t.cpp
+++ b/tests/chunks/pipeline-interests-aimd.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2022, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -29,6 +29,8 @@
 
 #include "pipeline-interests-fixture.hpp"
 
+#include <cmath>
+
 namespace ndn::chunks::tests {
 
 using namespace ndn::tests;
@@ -45,16 +47,16 @@
   void
   createPipeline()
   {
-    auto pline = make_unique<PipelineInterestsAimd>(face, rttEstimator, opt);
+    auto pline = std::make_unique<PipelineInterestsAimd>(face, rttEstimator, opt);
     pipeline = pline.get();
     setPipeline(std::move(pline));
   }
 
 private:
-  static shared_ptr<RttEstimatorWithStats::Options>
+  static std::shared_ptr<RttEstimatorWithStats::Options>
   makeRttEstimatorOptions()
   {
-    auto rttOptions = make_shared<RttEstimatorWithStats::Options>();
+    auto rttOptions = std::make_shared<RttEstimatorWithStats::Options>();
     rttOptions->alpha = 0.125;
     rttOptions->beta = 0.25;
     rttOptions->k = 4;
@@ -118,7 +120,7 @@
   for (uint64_t i = pipeline->m_ssthresh; i < nDataSegments - 1; ++i) { // congestion avoidance
     face.receive(*makeDataWithSegment(i));
     advanceClocks(time::nanoseconds(1));
-    BOOST_CHECK_CLOSE(pipeline->m_cwnd - preCwnd, opt.aiStep / floor(preCwnd), MARGIN);
+    BOOST_CHECK_CLOSE(pipeline->m_cwnd - preCwnd, opt.aiStep / std::floor(preCwnd), MARGIN);
     preCwnd = pipeline->m_cwnd;
   }
 
diff --git a/tests/chunks/pipeline-interests-cubic.t.cpp b/tests/chunks/pipeline-interests-cubic.t.cpp
index d84cce5..6a36105 100644
--- a/tests/chunks/pipeline-interests-cubic.t.cpp
+++ b/tests/chunks/pipeline-interests-cubic.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2022, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -45,16 +45,16 @@
   void
   createPipeline()
   {
-    auto pline = make_unique<PipelineInterestsCubic>(face, rttEstimator, opt);
+    auto pline = std::make_unique<PipelineInterestsCubic>(face, rttEstimator, opt);
     pipeline = pline.get();
     setPipeline(std::move(pline));
   }
 
 private:
-  static shared_ptr<RttEstimatorWithStats::Options>
+  static std::shared_ptr<RttEstimatorWithStats::Options>
   makeRttEstimatorOptions()
   {
-    auto rttOptions = make_shared<RttEstimatorWithStats::Options>();
+    auto rttOptions = std::make_shared<RttEstimatorWithStats::Options>();
     rttOptions->alpha = 0.125;
     rttOptions->beta = 0.25;
     rttOptions->k = 8;
diff --git a/tests/chunks/pipeline-interests-fixed.t.cpp b/tests/chunks/pipeline-interests-fixed.t.cpp
index b4f9723..24f14e9 100644
--- a/tests/chunks/pipeline-interests-fixed.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2022, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -29,6 +29,8 @@
 
 #include "pipeline-interests-fixture.hpp"
 
+#include <cmath>
+
 namespace ndn::chunks::tests {
 
 class PipelineInterestFixedFixture : public PipelineInterestsFixture
@@ -46,7 +48,7 @@
   void
   createPipeline()
   {
-    auto pline = make_unique<PipelineInterestsFixed>(face, opt);
+    auto pline = std::make_unique<PipelineInterestsFixed>(face, opt);
     pipeline = pline.get();
     setPipeline(std::move(pline));
   }
@@ -187,7 +189,7 @@
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize * 3 - 2);
 
   // nack for the first pipeline element (segment #0)
-  auto nack = make_shared<lp::Nack>(face.sentInterests[opt.maxPipelineSize]);
+  auto nack = std::make_shared<lp::Nack>(face.sentInterests[opt.maxPipelineSize]);
   nack->setReason(lp::NackReason::DUPLICATE);
   face.receive(*nack);
 
@@ -232,7 +234,7 @@
   advanceClocks(opt.interestLifetime);
 
   // nack for the first pipeline element (segment #0)
-  auto nack = make_shared<lp::Nack>(face.sentInterests[opt.maxPipelineSize]);
+  auto nack = std::make_shared<lp::Nack>(face.sentInterests[opt.maxPipelineSize]);
   nack->setReason(lp::NackReason::DUPLICATE);
   face.receive(*nack);
   BOOST_CHECK_EQUAL(hasFailed, false);
@@ -261,7 +263,7 @@
 
   // send nack for all the pipeline elements first interest
   for (size_t i = 0; i < opt.maxPipelineSize; i++) {
-    auto nack = make_shared<lp::Nack>(face.sentInterests[i]);
+    auto nack = std::make_shared<lp::Nack>(face.sentInterests[i]);
     nack->setReason(lp::NackReason::CONGESTION);
     face.receive(*nack);
     advanceClocks(time::nanoseconds(1));
@@ -283,7 +285,7 @@
     }
 
     for (size_t j = 0; j < opt.maxPipelineSize; j++) {
-      auto nack = make_shared<lp::Nack>(face.sentInterests[(opt.maxPipelineSize * i) + j]);
+      auto nack = std::make_shared<lp::Nack>(face.sentInterests[(opt.maxPipelineSize * i) + j]);
       nack->setReason(lp::NackReason::CONGESTION);
       face.receive(*nack);
       advanceClocks(time::nanoseconds(1));
diff --git a/tests/chunks/pipeline-interests-fixture.hpp b/tests/chunks/pipeline-interests-fixture.hpp
index 215f544..4e42223 100644
--- a/tests/chunks/pipeline-interests-fixture.hpp
+++ b/tests/chunks/pipeline-interests-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2023, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -44,21 +44,21 @@
 {
 protected:
   void
-  setPipeline(unique_ptr<PipelineInterests> pline)
+  setPipeline(std::unique_ptr<PipelineInterests> pline)
   {
     m_pipeline = std::move(pline);
   }
 
-  shared_ptr<Data>
+  std::shared_ptr<Data>
   makeDataWithSegment(uint64_t segmentNo, bool setFinalBlockId = true) const
   {
-    auto data = make_shared<Data>(Name(name).appendVersion(0).appendSegment(segmentNo));
+    auto data = std::make_shared<Data>(Name(name).appendVersion(0).appendSegment(segmentNo));
     if (setFinalBlockId)
       data->setFinalBlock(name::Component::fromSegment(nDataSegments - 1));
     return signData(data);
   }
 
-  shared_ptr<Data>
+  std::shared_ptr<Data>
   makeDataWithSegmentAndCongMark(uint64_t segmentNo,
                                  uint64_t congestionMark = 1,
                                  bool setFinalBlockId = true) const
@@ -83,7 +83,7 @@
   bool hasFailed = false;
 
 private:
-  unique_ptr<PipelineInterests> m_pipeline;
+  std::unique_ptr<PipelineInterests> m_pipeline;
 };
 
 } // namespace ndn::chunks::tests
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index 8a51b8e..0764f0c 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Arizona Board of Regents.
+ * Copyright (c) 2014-2024,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -24,6 +24,7 @@
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
+#include <boost/lexical_cast.hpp>
 #include <boost/test/tools/output_test_stream.hpp>
 
 namespace ndn::peek::tests {
@@ -63,13 +64,13 @@
   void
   initialize(const PeekOptions& opts = makeDefaultOptions())
   {
-    peek = make_unique<NdnPeek>(face, opts);
+    peek = std::make_unique<NdnPeek>(face, opts);
   }
 
 protected:
   DummyClientFace face{m_io};
   output_test_stream output;
-  unique_ptr<NdnPeek> peek;
+  std::unique_ptr<NdnPeek> peek;
 };
 
 class OutputFull
@@ -232,7 +233,7 @@
 BOOST_AUTO_TEST_CASE(ApplicationParameters)
 {
   auto options = makeDefaultOptions();
-  options.applicationParameters = make_shared<Buffer>("hello", 5);
+  options.applicationParameters = std::make_shared<Buffer>("hello", 5);
   initialize(options);
 
   peek->start();
@@ -305,7 +306,7 @@
 BOOST_AUTO_TEST_CASE(OversizedPacket)
 {
   auto options = makeDefaultOptions();
-  options.applicationParameters = make_shared<Buffer>(MAX_NDN_PACKET_SIZE);
+  options.applicationParameters = std::make_shared<Buffer>(MAX_NDN_PACKET_SIZE);
   initialize(options);
 
   peek->start();
diff --git a/tests/peek/ndnpoke.t.cpp b/tests/peek/ndnpoke.t.cpp
index b20f377..1c2a2c0 100644
--- a/tests/peek/ndnpoke.t.cpp
+++ b/tests/peek/ndnpoke.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  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,
@@ -47,7 +47,7 @@
   void
   initialize(const PokeOptions& opts = makeDefaultOptions())
   {
-    poke = make_unique<NdnPoke>(face, m_keyChain, payload, opts);
+    poke = std::make_unique<NdnPoke>(face, m_keyChain, payload, opts);
   }
 
   static PokeOptions
@@ -61,7 +61,7 @@
 protected:
   DummyClientFace face{m_io, m_keyChain, {true, WANT_PREFIX_REG_REPLY}};
   std::stringstream payload{"Hello, world!\n"};
-  unique_ptr<NdnPoke> poke;
+  std::unique_ptr<NdnPoke> poke;
 };
 
 BOOST_AUTO_TEST_SUITE(Peek)
diff --git a/tests/ping/client/statistics-collector.t.cpp b/tests/ping/client/statistics-collector.t.cpp
index 5d3e0d3..30f2c4b 100644
--- a/tests/ping/client/statistics-collector.t.cpp
+++ b/tests/ping/client/statistics-collector.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Arizona Board of Regents.
+ * Copyright (c) 2014-2024,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,6 +22,7 @@
 #include "tests/test-common.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
+#include <cmath>
 
 namespace ndn::ping::client::tests {
 
diff --git a/tests/ping/integrated.t.cpp b/tests/ping/integrated.t.cpp
index 4a85fda..caad9f8 100644
--- a/tests/ping/integrated.t.cpp
+++ b/tests/ping/integrated.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2015-2023,  Arizona Board of Regents.
+ * Copyright (c) 2015-2024,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -54,7 +54,7 @@
   void
   receive(DummyClientFace& face, const Packet& pkt)
   {
-    boost::asio::post(m_io, [=, &face] {
+    boost::asio::post(m_io, [&face, pkt, wantLoss = wantLoss] {
       if (!wantLoss) {
         face.receive(pkt);
       }
@@ -88,7 +88,7 @@
   serverOpts.nMaxPings = 4;
   serverOpts.wantTimestamp = false;
   serverOpts.payloadSize = 0;
-  server = make_unique<server::PingServer>(serverFace, m_keyChain, serverOpts);
+  server = std::make_unique<server::PingServer>(serverFace, m_keyChain, serverOpts);
   BOOST_REQUIRE_EQUAL(0, server->getNPings());
   server->start();
 
@@ -101,7 +101,7 @@
   clientOpts.interval = 100_ms;
   clientOpts.timeout = 2_s;
   clientOpts.startSeq = 1000;
-  client = make_unique<client::Ping>(clientFace, clientOpts);
+  client = std::make_unique<client::Ping>(clientFace, clientOpts);
   client->afterFinish.connect([this] { onFinish(); });
   client->start();
 
@@ -121,7 +121,7 @@
   serverOpts.nMaxPings = 4;
   serverOpts.wantTimestamp = false;
   serverOpts.payloadSize = 0;
-  server = make_unique<server::PingServer>(serverFace, m_keyChain, serverOpts);
+  server = std::make_unique<server::PingServer>(serverFace, m_keyChain, serverOpts);
   BOOST_REQUIRE_EQUAL(0, server->getNPings());
   server->start();
 
@@ -134,7 +134,7 @@
   clientOpts.interval = 100_ms;
   clientOpts.timeout = 500_ms;
   clientOpts.startSeq = 1000;
-  client = make_unique<client::Ping>(clientFace, clientOpts);
+  client = std::make_unique<client::Ping>(clientFace, clientOpts);
   client->afterFinish.connect([this] { onFinish(); });
   client->start();
 
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index 89a764c..91ebcd4 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  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,
@@ -27,7 +27,7 @@
 
 namespace ndn::tests {
 
-shared_ptr<Interest>
+std::shared_ptr<Interest>
 makeInterest(const Name& name, bool canBePrefix, std::optional<time::milliseconds> lifetime,
              std::optional<Interest::Nonce> nonce)
 {
@@ -40,7 +40,7 @@
   return interest;
 }
 
-shared_ptr<Data>
+std::shared_ptr<Data>
 makeData(const Name& name)
 {
   auto data = std::make_shared<Data>(name);
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index a6edb6e..6e66933 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  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,
@@ -29,48 +29,51 @@
 #include "core/common.hpp"
 #include "tests/boost-test.hpp"
 
+#include <ndn-cxx/lp/nack.hpp>
+#include <optional>
+
 namespace ndn::tests {
 
 /**
- * \brief Create an Interest
+ * \brief Create an Interest.
  */
-shared_ptr<Interest>
+std::shared_ptr<Interest>
 makeInterest(const Name& name, bool canBePrefix = false,
              std::optional<time::milliseconds> lifetime = std::nullopt,
              std::optional<Interest::Nonce> nonce = std::nullopt);
 
 /**
- * \brief Create a Data with a null (i.e., empty) signature
+ * \brief Create a Data with a null (i.e., empty) signature.
  *
  * If a "real" signature is desired, use KeyChainFixture and sign again with `m_keyChain`.
  */
-shared_ptr<Data>
+std::shared_ptr<Data>
 makeData(const Name& name);
 
 /**
- * \brief Add a null signature to \p data
+ * \brief Add a null signature to \p data.
  */
 Data&
 signData(Data& data);
 
 /**
- * \brief Add a null signature to \p data
+ * \brief Add a null signature to \p data.
  */
-inline shared_ptr<Data>
-signData(shared_ptr<Data> data)
+inline std::shared_ptr<Data>
+signData(std::shared_ptr<Data> data)
 {
   signData(*data);
   return data;
 }
 
 /**
- * \brief Create a Nack
+ * \brief Create a Nack.
  */
 lp::Nack
 makeNack(Interest interest, lp::NackReason reason);
 
 /**
- * \brief Replace a name component in a packet
+ * \brief Replace a name component in a packet.
  * \param[in,out] pkt the packet
  * \param index the index of the name component to replace
  * \param args arguments to name::Component constructor
