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/integration/face.cpp b/tests/integration/face.cpp
index 9357094..7bd2408 100644
--- a/tests/integration/face.cpp
+++ b/tests/integration/face.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).
*
@@ -37,8 +37,7 @@
#include <boost/mpl/vector.hpp>
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
static Name
makeVeryLongName(Name prefix = Name())
@@ -377,5 +376,4 @@
BOOST_AUTO_TEST_SUITE_END() // IoRoutine
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/integration/network-monitor.cpp b/tests/integration/network-monitor.cpp
index 0e7be10..cf6d8bd 100644
--- a/tests/integration/network-monitor.cpp
+++ b/tests/integration/network-monitor.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).
*
@@ -33,9 +33,9 @@
#include <boost/asio/io_service.hpp>
#include <iostream>
-namespace ndn {
-namespace net {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::net;
static std::ostream&
logEvent(const shared_ptr<const NetworkInterface>& ni = nullptr, std::ostream& os = std::cout)
@@ -66,7 +66,7 @@
monitor.onInterfaceAdded.connect([] (const shared_ptr<const NetworkInterface>& ni) {
logEvent(ni) << "onInterfaceAdded\n" << *ni;
- logEvent(ni) << "link-type: " << detail::getLinkType(ni->getName()) << std::endl;
+ logEvent(ni) << "link-type: " << net::detail::getLinkType(ni->getName()) << std::endl;
ni->onAddressAdded.connect([ni] (const NetworkAddress& address) {
logEvent(ni) << "onAddressAdded " << address << std::endl;
@@ -78,7 +78,7 @@
ni->onStateChanged.connect([ni] (InterfaceState oldState, InterfaceState newState) {
logEvent(ni) << "onStateChanged " << oldState << " -> " << newState << std::endl;
- logEvent(ni) << "link-type: " << detail::getLinkType(ni->getName()) << std::endl;
+ logEvent(ni) << "link-type: " << net::detail::getLinkType(ni->getName()) << std::endl;
});
ni->onMtuChanged.connect([ni] (uint32_t oldMtu, uint32_t newMtu) {
@@ -93,6 +93,4 @@
io.run();
}
-} // namespace tests
-} // namespace net
-} // namespace ndn
+} // namespace ndn::tests