Refactor and modernize namespace declarations

 * Completely remove inline namespace v2
 * Flatten some unnecessarily deep namespace nesting
 * Move DummyClientFace, Segmenter, SegmentFetcher to namespace ndn
 * Move all unit tests to namespace ndn::tests

Change-Id: I8bcfcf9fd669936a3277d2d5d505f765b4b05742
diff --git a/tests/unit/lp/cache-policy.t.cpp b/tests/unit/lp/cache-policy.t.cpp
index 8b27a6c..08b9d25 100644
--- a/tests/unit/lp/cache-policy.t.cpp
+++ b/tests/unit/lp/cache-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,9 +25,9 @@
 
 #include "tests/boost-test.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
 BOOST_AUTO_TEST_SUITE(TestCachePolicy)
@@ -92,6 +92,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestCachePolicy
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/fields.t.cpp b/tests/unit/lp/fields.t.cpp
index e828051..5028b2b 100644
--- a/tests/unit/lp/fields.t.cpp
+++ b/tests/unit/lp/fields.t.cpp
@@ -21,9 +21,9 @@
 
 #include "ndn-cxx/lp/fields.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_CONCEPT_ASSERT((Field<FragmentField>));
 BOOST_CONCEPT_ASSERT((Field<SequenceField>));
@@ -40,6 +40,4 @@
 BOOST_CONCEPT_ASSERT((Field<NonDiscoveryField>));
 BOOST_CONCEPT_ASSERT((Field<PrefixAnnouncementField>));
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/nack-header.t.cpp b/tests/unit/lp/nack-header.t.cpp
index c914eb0..efe31b0 100644
--- a/tests/unit/lp/nack-header.t.cpp
+++ b/tests/unit/lp/nack-header.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,9 +25,9 @@
 
 #include "tests/boost-test.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
 BOOST_AUTO_TEST_SUITE(TestNackHeader)
@@ -112,6 +112,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestNackHeader
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/nack.t.cpp b/tests/unit/lp/nack.t.cpp
index ef30de1..64835ef 100644
--- a/tests/unit/lp/nack.t.cpp
+++ b/tests/unit/lp/nack.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,9 +25,9 @@
 
 #include "tests/boost-test.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
 BOOST_AUTO_TEST_SUITE(TestNack)
@@ -60,6 +60,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestNack
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/packet.t.cpp b/tests/unit/lp/packet.t.cpp
index 68f55fc..01cc05b 100644
--- a/tests/unit/lp/packet.t.cpp
+++ b/tests/unit/lp/packet.t.cpp
@@ -25,9 +25,9 @@
 #include "tests/key-chain-fixture.hpp"
 #include "tests/test-common.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
 BOOST_AUTO_TEST_SUITE(TestPacket)
@@ -425,10 +425,10 @@
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
-BOOST_FIXTURE_TEST_CASE(DecodePrefixAnnouncement, ndn::tests::KeyChainFixture)
+BOOST_FIXTURE_TEST_CASE(DecodePrefixAnnouncement, KeyChainFixture)
 {
   // Construct Data which prefix announcement is attached to
-  auto data0 = ndn::tests::makeData("/edu/ua/cs/news/index.html");
+  auto data0 = makeData("/edu/ua/cs/news/index.html");
 
   Packet packet0;
   packet0.wireDecode(data0->wireEncode());
@@ -455,6 +455,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestPacket
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/pit-token.t.cpp b/tests/unit/lp/pit-token.t.cpp
index 49d77c1..6f45b32 100644
--- a/tests/unit/lp/pit-token.t.cpp
+++ b/tests/unit/lp/pit-token.t.cpp
@@ -26,9 +26,9 @@
 
 #include <boost/lexical_cast.hpp>
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
 BOOST_AUTO_TEST_SUITE(TestPitToken)
@@ -76,6 +76,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestPitToken
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/lp/prefix-announcement-header.t.cpp b/tests/unit/lp/prefix-announcement-header.t.cpp
index a107eb5..ef4b11f 100644
--- a/tests/unit/lp/prefix-announcement-header.t.cpp
+++ b/tests/unit/lp/prefix-announcement-header.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,12 +25,12 @@
 #include "tests/boost-test.hpp"
 #include "tests/key-chain-fixture.hpp"
 
-namespace ndn {
-namespace lp {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::lp;
 
 BOOST_AUTO_TEST_SUITE(Lp)
-BOOST_FIXTURE_TEST_SUITE(TestPrefixAnnouncementHeader, ndn::tests::KeyChainFixture)
+BOOST_FIXTURE_TEST_SUITE(TestPrefixAnnouncementHeader, KeyChainFixture)
 
 BOOST_AUTO_TEST_CASE(EncodeDecode)
 {
@@ -45,7 +45,7 @@
   const Data& data = pa.toData(m_keyChain, signingWithSha256(), 1);
   Block encodedData = data.wireEncode();
 
-  Block expectedBlock(tlv::PrefixAnnouncement);
+  Block expectedBlock(ndn::lp::tlv::PrefixAnnouncement);
   expectedBlock.push_back(encodedData);
   expectedBlock.encode();
 
@@ -64,6 +64,4 @@
 BOOST_AUTO_TEST_SUITE_END() // TestPrefixAnnouncementHeader
 BOOST_AUTO_TEST_SUITE_END() // Lp
 
-} // namespace tests
-} // namespace lp
-} // namespace ndn
+} // namespace ndn::tests