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/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