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/detail/cancel-handle.t.cpp b/tests/unit/detail/cancel-handle.t.cpp
index 2e951dd..e35fe55 100644
--- a/tests/unit/detail/cancel-handle.t.cpp
+++ b/tests/unit/detail/cancel-handle.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 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).
*
@@ -23,9 +23,9 @@
#include "tests/boost-test.hpp"
-namespace ndn {
-namespace detail {
-namespace tests {
+namespace ndn::tests {
+
+using ndn::detail::CancelHandle;
BOOST_AUTO_TEST_SUITE(Detail)
BOOST_AUTO_TEST_SUITE(TestCancelHandle)
@@ -55,7 +55,7 @@
BOOST_AUTO_TEST_SUITE(ScopedHandle)
-using ScopedTestHandle = ScopedCancelHandle<CancelHandle>;
+using ScopedTestHandle = detail::ScopedCancelHandle<CancelHandle>;
BOOST_AUTO_TEST_CASE(ManualCancel)
{
@@ -134,6 +134,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestCancelHandle
BOOST_AUTO_TEST_SUITE_END() // Detail
-} // namespace tests
-} // namespace detail
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/detail/packet-base.t.cpp b/tests/unit/detail/packet-base.t.cpp
index 41d47db..32e7e42 100644
--- a/tests/unit/detail/packet-base.t.cpp
+++ b/tests/unit/detail/packet-base.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,8 +25,7 @@
#include "tests/boost-test.hpp"
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
BOOST_AUTO_TEST_SUITE(Detail)
BOOST_AUTO_TEST_SUITE(TestPacketBase)
@@ -62,5 +61,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestPacketBase
BOOST_AUTO_TEST_SUITE_END() // Detail
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/unit/detail/tag-host.t.cpp b/tests/unit/detail/tag-host.t.cpp
index 72caa7e..c597203 100644
--- a/tests/unit/detail/tag-host.t.cpp
+++ b/tests/unit/detail/tag-host.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).
*
@@ -27,8 +27,7 @@
#include <boost/mpl/vector.hpp>
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
BOOST_AUTO_TEST_SUITE(Detail)
BOOST_AUTO_TEST_SUITE(TestTagHost)
@@ -53,7 +52,7 @@
}
};
-typedef boost::mpl::vector<TagHost, Interest, Data> Fixtures;
+using Fixtures = boost::mpl::vector<TagHost, Interest, Data>;
BOOST_FIXTURE_TEST_CASE_TEMPLATE(Basic, T, Fixtures, T)
{
@@ -84,5 +83,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestTagHost
BOOST_AUTO_TEST_SUITE_END() // Detail
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests