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