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/transform/stream-source.t.cpp b/tests/unit/security/transform/stream-source.t.cpp
index 1446bc9..e20ff23 100644
--- a/tests/unit/security/transform/stream-source.t.cpp
+++ b/tests/unit/security/transform/stream-source.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,10 +27,9 @@
#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/vector.hpp>
-namespace ndn {
-namespace security {
-namespace transform {
-namespace tests {
+namespace ndn::tests {
+
+using namespace ndn::security::transform;
BOOST_AUTO_TEST_SUITE(Security)
BOOST_AUTO_TEST_SUITE(Transform)
@@ -77,24 +76,21 @@
BOOST_CHECK_EQUAL(os.str(), "");
}
-typedef boost::mpl::vector<
+using BadBits = boost::mpl::vector<
boost::mpl::integral_c<std::ios_base::iostate, std::ios_base::badbit>,
boost::mpl::integral_c<std::ios_base::iostate, std::ios_base::failbit>
-> BadBits;
+>;
BOOST_AUTO_TEST_CASE_TEMPLATE(BadStream, BadBit, BadBits)
{
std::stringstream is;
is.setstate(BadBit::value);
std::stringstream os;
- BOOST_CHECK_THROW(streamSource(is) >> streamSink(os), transform::Error);
+ BOOST_CHECK_THROW(streamSource(is) >> streamSink(os), Error);
}
BOOST_AUTO_TEST_SUITE_END() // TestStreamSource
BOOST_AUTO_TEST_SUITE_END() // Transform
BOOST_AUTO_TEST_SUITE_END() // Security
-} // namespace tests
-} // namespace transform
-} // namespace security
-} // namespace ndn
+} // namespace ndn::tests