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/other/cs-benchmark.cpp b/tests/other/cs-benchmark.cpp
index fe4eeaa..793ccf1 100644
--- a/tests/other/cs-benchmark.cpp
+++ b/tests/other/cs-benchmark.cpp
@@ -32,8 +32,7 @@
#include <valgrind/callgrind.h>
#endif
-namespace nfd {
-namespace tests {
+namespace nfd::tests {
class CsBenchmarkFixture
{
@@ -210,5 +209,4 @@
std::cout << "find(CanBePrefix-hit) " << (N_INTERESTS * N_CHILDREN * REPEAT) << ": " << d << std::endl;
}
-} // namespace tests
-} // namespace nfd
+} // namespace nfd::tests
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 0b809c6..c9a28b6 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -37,8 +37,7 @@
#include <valgrind/callgrind.h>
#endif
-namespace nfd {
-namespace tests {
+namespace nfd::tests {
class FaceBenchmark
{
@@ -171,8 +170,7 @@
std::vector<std::pair<FaceUri, FaceUri>> m_faceUris;
};
-} // namespace tests
-} // namespace nfd
+} // namespace nfd::tests
int
main(int argc, char** argv)
diff --git a/tests/other/fw/congestion-mark-strategy.cpp b/tests/other/fw/congestion-mark-strategy.cpp
index 3d920c7..078799b 100644
--- a/tests/other/fw/congestion-mark-strategy.cpp
+++ b/tests/other/fw/congestion-mark-strategy.cpp
@@ -25,8 +25,7 @@
#include "congestion-mark-strategy.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
NFD_REGISTER_STRATEGY(CongestionMarkStrategy);
@@ -91,5 +90,4 @@
}
}
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
diff --git a/tests/other/fw/congestion-mark-strategy.hpp b/tests/other/fw/congestion-mark-strategy.hpp
index 9b0f982..7c41f3e 100644
--- a/tests/other/fw/congestion-mark-strategy.hpp
+++ b/tests/other/fw/congestion-mark-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "daemon/fw/best-route-strategy.hpp"
-namespace nfd {
-namespace fw {
+namespace nfd::fw {
/** \brief Congestion Mark integration testing strategy
*
@@ -58,7 +57,6 @@
bool m_shouldPreserveMark = true;
};
-} // namespace fw
-} // namespace nfd
+} // namespace nfd::fw
#endif // NFD_TESTS_OTHER_FW_CONGESTION_MARK_STRATEGY_HPP
diff --git a/tests/other/pit-fib-benchmark.cpp b/tests/other/pit-fib-benchmark.cpp
index c6888d1..a154297 100644
--- a/tests/other/pit-fib-benchmark.cpp
+++ b/tests/other/pit-fib-benchmark.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,8 +33,7 @@
#include <valgrind/callgrind.h>
#endif
-namespace nfd {
-namespace tests {
+namespace nfd::tests {
class PitFibBenchmarkFixture
{
@@ -149,5 +148,4 @@
std::cout << time::duration_cast<time::microseconds>(t2 - t1) << std::endl;
}
-} // namespace tests
-} // namespace nfd
+} // namespace nfd::tests