Refactor and modernize namespace declarations

Move all unit tests to namespace nfd::tests

Delete unused header core/algorithm.hpp

Change-Id: I5591f0c5f3bb5db67f8b45fae95471f8a555ca68
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index ec98657..3aa106b 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -36,14 +36,12 @@
 
 #include <boost/concept/assert.hpp>
 
-namespace nfd {
-namespace tools {
-namespace tests {
+namespace nfd::tests {
 
-using namespace nfd::tests;
 using ndn::nfd::ControlParameters;
 
-/** \brief Fixture to emulate NFD management.
+/**
+ * \brief Fixture to emulate NFD management.
  */
 class MockNfdMgmtFixture : public IoFixture, public KeyChainFixture
 {
@@ -210,9 +208,7 @@
   std::function<void(const Interest&)> processInterest;
 };
 
-} // namespace tests
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tests
 
 /** \brief require the command in \p interest has expected prefix
  *  \note This must be used in processInterest lambda, and the Interest must be named 'interest'.
diff --git a/tests/tools/ndn-autoconfig-server/program.t.cpp b/tests/tools/ndn-autoconfig-server/program.t.cpp
index 96bed31..c70cedd 100644
--- a/tests/tools/ndn-autoconfig-server/program.t.cpp
+++ b/tests/tools/ndn-autoconfig-server/program.t.cpp
@@ -32,10 +32,7 @@
 #include <ndn-cxx/util/dummy-client-face.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
 
-namespace ndn {
-namespace tools {
-namespace autoconfig_server {
-namespace tests {
+namespace ndn::autoconfig_server::tests {
 
 class AutoconfigServerFixture : public ::nfd::tests::KeyChainFixture
 {
@@ -136,7 +133,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestProgram
 BOOST_AUTO_TEST_SUITE_END() // NdnAutoconfigServer
 
-} // namespace tests
-} // namespace autoconfig_server
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig_server::tests
diff --git a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
index b71cc84..eaaca51 100644
--- a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
+++ b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
@@ -30,16 +30,10 @@
 #include <ndn-cxx/encoding/block-helpers.hpp>
 #include <ndn-cxx/encoding/tlv-nfd.hpp>
 
-namespace ndn {
-namespace tools {
-namespace autoconfig {
-namespace tests {
-
-using namespace ::nfd::tools::tests;
-using nfd::ControlParameters;
+namespace ndn::autoconfig::tests {
 
 BOOST_AUTO_TEST_SUITE(NdnAutoconfig)
-BOOST_FIXTURE_TEST_SUITE(TestMulticastDiscovery, MockNfdMgmtFixture)
+BOOST_FIXTURE_TEST_SUITE(TestMulticastDiscovery, ::nfd::tests::MockNfdMgmtFixture)
 
 BOOST_AUTO_TEST_CASE(Normal)
 {
@@ -69,7 +63,7 @@
       BOOST_REQUIRE(req->hasFaceId());
 
       if (req->getFaceId() == 860) {
-        ControlParameters resp;
+        nfd::ControlParameters resp;
         resp.setName("/localhop/ndn-autoconf/hub")
             .setFaceId(860)
             .setOrigin(nfd::ROUTE_ORIGIN_APP)
@@ -98,7 +92,7 @@
     }
 
     if (interest.getName() == "/localhop/ndn-autoconf/hub") {
-      auto data = makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
+      auto data = ::nfd::tests::makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
       data->setFreshnessPeriod(1_s);
       data->setContent(makeStringBlock(tlv::nfd::Uri, "udp://router.example.net"));
       face.receive(*data);
@@ -131,7 +125,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestMulticastDiscovery
 BOOST_AUTO_TEST_SUITE_END() // NdnAutoconfig
 
-} // namespace tests
-} // namespace autoconfig
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig::tests
diff --git a/tests/tools/ndn-autoconfig/procedure.t.cpp b/tests/tools/ndn-autoconfig/procedure.t.cpp
index a392da8..d8911bb 100644
--- a/tests/tools/ndn-autoconfig/procedure.t.cpp
+++ b/tests/tools/ndn-autoconfig/procedure.t.cpp
@@ -29,16 +29,10 @@
 
 #include <boost/logic/tribool.hpp>
 
-namespace ndn {
-namespace tools {
-namespace autoconfig {
-namespace tests {
-
-using namespace ::nfd::tests;
-using nfd::ControlParameters;
+namespace ndn::autoconfig::tests {
 
 template<typename ProcedureClass>
-class ProcedureFixture : public ::nfd::tools::tests::MockNfdMgmtFixture
+class ProcedureFixture : public ::nfd::tests::MockNfdMgmtFixture
 {
 public:
   void
@@ -128,7 +122,7 @@
 
 private:
   void
-  makeStages(const Options& options) override
+  makeStages(const Options&) override
   {
     m_stages.push_back(make_unique<DummyStage>("first", &nCalls1, FaceUri("udp://188.7.60.95"), m_io));
     m_stages.push_back(make_unique<DummyStage>("second", &nCalls2, std::nullopt, m_io));
@@ -155,7 +149,7 @@
 
 private:
   void
-  makeStages(const Options& options) override
+  makeStages(const Options&) override
   {
     m_stages.push_back(make_unique<DummyStage>("first", &nCalls1, std::nullopt, m_io));
     m_stages.push_back(make_unique<DummyStage>("second", &nCalls2, FaceUri("tcp://40.23.174.71"), m_io));
@@ -183,7 +177,7 @@
       BOOST_REQUIRE(req->hasUri());
       BOOST_CHECK_EQUAL(req->getUri(), "udp4://188.7.60.95:6363");
 
-      ControlParameters resp;
+      nfd::ControlParameters resp;
       resp.setFaceId(1178)
           .setUri("udp4://188.7.60.95:6363")
           .setLocalUri("udp4://110.69.164.68:23197")
@@ -210,7 +204,7 @@
         BOOST_ERROR("unexpected prefix registration " << req->getName());
       }
 
-      ControlParameters resp;
+      nfd::ControlParameters resp;
       resp.setName(req->getName())
           .setFaceId(1178)
           .setOrigin(nfd::ROUTE_ORIGIN_AUTOCONF)
@@ -238,7 +232,7 @@
   this->processInterest = [&] (const Interest& interest) {
     auto req = parseCommand(interest, "/localhost/nfd/faces/create");
     if (req) {
-      ControlParameters resp;
+      nfd::ControlParameters resp;
       resp.setFaceId(3146)
           .setUri("tcp4://40.23.174.71:6363")
           .setLocalUri("tcp4://34.213.69.67:14445")
@@ -261,7 +255,7 @@
         BOOST_ERROR("unexpected prefix registration " << req->getName());
       }
 
-      ControlParameters resp;
+      nfd::ControlParameters resp;
       resp.setName(req->getName())
           .setFaceId(3146)
           .setOrigin(nfd::ROUTE_ORIGIN_AUTOCONF)
@@ -284,7 +278,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestProcedure
 BOOST_AUTO_TEST_SUITE_END() // NdnAutoconfig
 
-} // namespace tests
-} // namespace autoconfig
-} // namespace tools
-} // namespace ndn
+} // namespace ndn::autoconfig::tests
diff --git a/tests/tools/nfdc/channel-module.t.cpp b/tests/tools/nfdc/channel-module.t.cpp
index 1f815ff..25ffe57 100644
--- a/tests/tools/nfdc/channel-module.t.cpp
+++ b/tests/tools/nfdc/channel-module.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  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,10 +27,7 @@
 
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_FIXTURE_TEST_SUITE(TestChannelModule, StatusFixture<ChannelModule>)
@@ -69,7 +66,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestChannelModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/command-definition.t.cpp b/tests/tools/nfdc/command-definition.t.cpp
index 7dbbbf6..6314e2e 100644
--- a/tests/tools/nfdc/command-definition.t.cpp
+++ b/tests/tools/nfdc/command-definition.t.cpp
@@ -28,10 +28,7 @@
 
 #include "tests/test-common.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_AUTO_TEST_SUITE(TestCommandDefinition)
@@ -383,7 +380,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestCommandDefinition
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/command-parser.t.cpp b/tests/tools/nfdc/command-parser.t.cpp
index 3c77c05..c9de564 100644
--- a/tests/tools/nfdc/command-parser.t.cpp
+++ b/tests/tools/nfdc/command-parser.t.cpp
@@ -27,10 +27,7 @@
 
 #include "tests/test-common.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_AUTO_TEST_SUITE(TestCommandParser)
@@ -138,7 +135,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestCommandParser
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/cs-module.t.cpp b/tests/tools/nfdc/cs-module.t.cpp
index 9b1ba0a..ac046bd 100644
--- a/tests/tools/nfdc/cs-module.t.cpp
+++ b/tests/tools/nfdc/cs-module.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,
@@ -28,10 +28,7 @@
 #include "status-fixture.hpp"
 #include "execute-command-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_AUTO_TEST_SUITE(TestCsModule)
@@ -278,7 +275,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestCsModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/execute-command-fixture.hpp b/tests/tools/nfdc/execute-command-fixture.hpp
index 103c50e..4a9df2d 100644
--- a/tests/tools/nfdc/execute-command-fixture.hpp
+++ b/tests/tools/nfdc/execute-command-fixture.hpp
@@ -33,12 +33,10 @@
 #include <boost/algorithm/string/split.hpp>
 #include <boost/test/tools/output_test_stream.hpp>
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
-/** \brief fixture to test command execution
+/**
+ * \brief Fixture to test command execution.
  */
 class ExecuteCommandFixture : public MockNfdMgmtFixture
 {
@@ -65,9 +63,6 @@
   int exitCode = -1;
 };
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
 
 #endif // NFD_TESTS_TOOLS_NFDC_EXECUTE_COMMAND_FIXTURE_HPP
diff --git a/tests/tools/nfdc/face-module.t.cpp b/tests/tools/nfdc/face-module.t.cpp
index d99383e..87356a1 100644
--- a/tests/tools/nfdc/face-module.t.cpp
+++ b/tests/tools/nfdc/face-module.t.cpp
@@ -28,10 +28,7 @@
 #include "execute-command-fixture.hpp"
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 using ndn::nfd::FaceQueryFilter;
 
@@ -1162,7 +1159,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestFaceModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/fib-module.t.cpp b/tests/tools/nfdc/fib-module.t.cpp
index 9476500..ea8b139 100644
--- a/tests/tools/nfdc/fib-module.t.cpp
+++ b/tests/tools/nfdc/fib-module.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,10 +27,7 @@
 
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_FIXTURE_TEST_SUITE(TestFibModule, StatusFixture<FibModule>)
@@ -98,7 +95,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestFibModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/format-helpers.t.cpp b/tests/tools/nfdc/format-helpers.t.cpp
index a9e4c87..26c9b1b 100644
--- a/tests/tools/nfdc/format-helpers.t.cpp
+++ b/tests/tools/nfdc/format-helpers.t.cpp
@@ -29,10 +29,7 @@
 
 #include <boost/test/tools/output_test_stream.hpp>
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 using boost::test_tools::output_test_stream;
 
@@ -141,7 +138,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestFormatHelpers
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/forwarder-general-module.t.cpp b/tests/tools/nfdc/forwarder-general-module.t.cpp
index 5d2255b..173ffb9 100644
--- a/tests/tools/nfdc/forwarder-general-module.t.cpp
+++ b/tests/tools/nfdc/forwarder-general-module.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,
@@ -27,10 +27,7 @@
 
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_FIXTURE_TEST_SUITE(TestForwarderGeneralModule, StatusFixture<ForwarderGeneralModule>)
@@ -123,7 +120,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestForwarderGeneralModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/help.t.cpp b/tests/tools/nfdc/help.t.cpp
index 6f5392c..f629f62 100644
--- a/tests/tools/nfdc/help.t.cpp
+++ b/tests/tools/nfdc/help.t.cpp
@@ -29,10 +29,7 @@
 
 #include <boost/test/tools/output_test_stream.hpp>
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_AUTO_TEST_SUITE(TestHelp)
@@ -100,7 +97,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestCommandParser
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp b/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
index 239faa9..eb197a4 100644
--- a/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
@@ -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,
@@ -28,16 +28,15 @@
 
 #include "tests/tools/mock-nfd-mgmt-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+#include <ndn-cxx/mgmt/nfd/face-query-filter.hpp>
+#include <ndn-cxx/mgmt/nfd/face-status.hpp>
 
-using namespace nfd::tests;
+namespace nfd::tools::nfdc::tests {
 
-/** \brief fixture to emulate NFD management
+/**
+ * \brief Fixture to emulate NFD management.
  */
-class MockNfdMgmtFixture : public nfd::tools::tests::MockNfdMgmtFixture
+class MockNfdMgmtFixture : public nfd::tests::MockNfdMgmtFixture
 {
 protected:
   /** \brief respond to FaceQuery requests
@@ -102,9 +101,6 @@
   }
 };
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
 
 #endif // NFD_TESTS_TOOLS_NFDC_MOCK_NFD_MGMT_FIXTURE_HPP
diff --git a/tests/tools/nfdc/rib-module.t.cpp b/tests/tools/nfdc/rib-module.t.cpp
index 7f268dd..b50625d 100644
--- a/tests/tools/nfdc/rib-module.t.cpp
+++ b/tests/tools/nfdc/rib-module.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,
@@ -28,10 +28,7 @@
 #include "execute-command-fixture.hpp"
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_FIXTURE_TEST_SUITE(TestRibModule, StatusFixture<RibModule>)
@@ -617,7 +614,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestRibModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index f00b135..7616306 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -33,10 +33,7 @@
 
 #include <boost/test/tools/output_test_stream.hpp>
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 using ndn::Face;
 using ndn::KeyChain;
@@ -152,9 +149,6 @@
   return s;
 }
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
 
 #endif // NFD_TESTS_TOOLS_NFDC_STATUS_FIXTURE_HPP
diff --git a/tests/tools/nfdc/status-report.t.cpp b/tests/tools/nfdc/status-report.t.cpp
index 2ab5c3e..f978c57 100644
--- a/tests/tools/nfdc/status-report.t.cpp
+++ b/tests/tools/nfdc/status-report.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,
@@ -27,10 +27,7 @@
 
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 const std::string STATUS_XML = stripXmlSpaces(R"XML(
   <?xml version="1.0"?>
@@ -120,7 +117,7 @@
   std::function<void()> processEventsFunc;
 };
 
-class StatusReportModulesFixture : public IoFixture, public KeyChainFixture
+class StatusReportModulesFixture : public nfd::tests::IoFixture, public nfd::tests::KeyChainFixture
 {
 protected:
   StatusReportModulesFixture()
@@ -211,7 +208,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestStatusReport
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests
diff --git a/tests/tools/nfdc/strategy-choice-module.t.cpp b/tests/tools/nfdc/strategy-choice-module.t.cpp
index 22f7d92..6ff8abb 100644
--- a/tests/tools/nfdc/strategy-choice-module.t.cpp
+++ b/tests/tools/nfdc/strategy-choice-module.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,
@@ -28,10 +28,7 @@
 #include "execute-command-fixture.hpp"
 #include "status-fixture.hpp"
 
-namespace nfd {
-namespace tools {
-namespace nfdc {
-namespace tests {
+namespace nfd::tools::nfdc::tests {
 
 BOOST_AUTO_TEST_SUITE(Nfdc)
 BOOST_AUTO_TEST_SUITE(TestStrategyChoiceModule)
@@ -262,7 +259,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestStrategyChoiceModule
 BOOST_AUTO_TEST_SUITE_END() // Nfdc
 
-} // namespace tests
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc::tests