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/security/validator-config/checker.t.cpp b/tests/unit/security/validator-config/checker.t.cpp
index 1170156..6c61085 100644
--- a/tests/unit/security/validator-config/checker.t.cpp
+++ b/tests/unit/security/validator-config/checker.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 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).
  *
@@ -27,14 +27,9 @@
 #include "tests/unit/security/validator-fixture.hpp"
 #include "tests/unit/security/validator-config/common.hpp"
 
-namespace ndn {
-namespace security {
-inline namespace v2 {
-namespace validator_config {
-namespace tests {
+namespace ndn::tests {
 
-using namespace ndn::tests;
-using namespace ndn::security::tests;
+using namespace ndn::security::validator_config;
 
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
@@ -343,8 +338,4 @@
 BOOST_AUTO_TEST_SUITE_END() // ValidatorConfig
 BOOST_AUTO_TEST_SUITE_END() // Security
 
-} // namespace tests
-} // namespace validator_config
-} // inline namespace v2
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/security/validator-config/common.hpp b/tests/unit/security/validator-config/common.hpp
index c4a4fe3..c984cf5 100644
--- a/tests/unit/security/validator-config/common.hpp
+++ b/tests/unit/security/validator-config/common.hpp
@@ -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).
  *
@@ -26,11 +26,9 @@
 
 #include <boost/property_tree/info_parser.hpp>
 
-namespace ndn {
-namespace security {
-inline namespace v2 {
-namespace validator_config {
-namespace tests {
+namespace ndn::tests {
+
+using ndn::security::validator_config::ConfigSection;
 
 inline ConfigSection
 makeSection(const std::string& config)
@@ -41,10 +39,6 @@
   return section;
 }
 
-} // namespace tests
-} // namespace validator_config
-} // inline namespace v2
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests
 
 #endif // NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
diff --git a/tests/unit/security/validator-config/filter.t.cpp b/tests/unit/security/validator-config/filter.t.cpp
index 42eeceb..a83217b 100644
--- a/tests/unit/security/validator-config/filter.t.cpp
+++ b/tests/unit/security/validator-config/filter.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 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,14 +25,9 @@
 #include "tests/unit/security/validator-config/common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
-namespace ndn {
-namespace security {
-inline namespace v2 {
-namespace validator_config {
-namespace tests {
+namespace ndn::tests {
 
-using namespace ndn::tests;
-using namespace ndn::security::tests;
+using namespace ndn::security::validator_config;
 
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
@@ -198,8 +193,4 @@
 BOOST_AUTO_TEST_SUITE_END() // ValidatorConfig
 BOOST_AUTO_TEST_SUITE_END() // Security
 
-} // namespace tests
-} // namespace validator_config
-} // inline namespace v2
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/security/validator-config/name-relation.t.cpp b/tests/unit/security/validator-config/name-relation.t.cpp
index 8879212..c81a092 100644
--- a/tests/unit/security/validator-config/name-relation.t.cpp
+++ b/tests/unit/security/validator-config/name-relation.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,11 +25,9 @@
 
 #include <boost/lexical_cast.hpp>
 
-namespace ndn {
-namespace security {
-inline namespace v2 {
-namespace validator_config {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::security::validator_config;
 
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
@@ -49,7 +47,7 @@
   BOOST_CHECK_EQUAL(getNameRelationFromString("equal"), NameRelation::EQUAL);
   BOOST_CHECK_EQUAL(getNameRelationFromString("is-prefix-of"), NameRelation::IS_PREFIX_OF);
   BOOST_CHECK_EQUAL(getNameRelationFromString("is-strict-prefix-of"), NameRelation::IS_STRICT_PREFIX_OF);
-  BOOST_CHECK_THROW(getNameRelationFromString("unknown"), validator_config::Error);
+  BOOST_CHECK_THROW(getNameRelationFromString("unknown"), Error);
 }
 
 BOOST_AUTO_TEST_CASE(CheckRelation)
@@ -70,8 +68,4 @@
 BOOST_AUTO_TEST_SUITE_END() // ValidatorConfig
 BOOST_AUTO_TEST_SUITE_END() // Security
 
-} // namespace tests
-} // namespace validator_config
-} // inline namespace v2
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/security/validator-config/rule.t.cpp b/tests/unit/security/validator-config/rule.t.cpp
index 4871521..ea0b4b7 100644
--- a/tests/unit/security/validator-config/rule.t.cpp
+++ b/tests/unit/security/validator-config/rule.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 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).
  *
@@ -27,14 +27,9 @@
 
 #include <boost/mpl/vector_c.hpp>
 
-namespace ndn {
-namespace security {
-inline namespace v2 {
-namespace validator_config {
-namespace tests {
+namespace ndn::tests {
 
-using namespace ndn::tests;
-using namespace ndn::security::tests;
+using namespace ndn::security::validator_config;
 
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(ValidatorConfig)
@@ -54,7 +49,7 @@
   const std::string ruleId = "rule-id";
   Rule rule;
   Name pktName;
-  shared_ptr<ValidationState> state;
+  shared_ptr<security::ValidationState> state;
 };
 
 using PktTypes = boost::mpl::vector<DataPkt, InterestV02Pkt, InterestV03Pkt>;
@@ -211,8 +206,4 @@
 BOOST_AUTO_TEST_SUITE_END() // ValidatorConfig
 BOOST_AUTO_TEST_SUITE_END() // Security
 
-} // namespace tests
-} // namespace validator_config
-} // inline namespace v2
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests