tests: move to namespace psync::tests
Change-Id: I462563e8f3d60fbf2a124bad4e412665adeb8186
diff --git a/tests/test-bloom-filter.cpp b/tests/test-bloom-filter.cpp
index a33c088..c052927 100644
--- a/tests/test-bloom-filter.cpp
+++ b/tests/test-bloom-filter.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -23,8 +23,9 @@
#include <ndn-cxx/name.hpp>
-namespace psync {
-namespace detail {
+namespace psync::tests {
+
+using detail::BloomFilter;
BOOST_AUTO_TEST_SUITE(TestBloomFilter)
@@ -55,5 +56,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace detail
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-consumer.cpp b/tests/test-consumer.cpp
index d3b8181..9057c1b 100644
--- a/tests/test-consumer.cpp
+++ b/tests/test-consumer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -24,7 +24,7 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Name;
@@ -60,7 +60,7 @@
BOOST_CHECK(!consumer.isSubscribed(subscription));
}
-BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, tests::IoFixture)
+BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, IoFixture)
{
ndn::DummyClientFace face(m_io);
Consumer::Options opts;
@@ -84,4 +84,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index a03d799..c833181 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -26,12 +26,12 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Interest;
using ndn::Name;
-class FullProducerFixture : public tests::IoFixture, public tests::KeyChainFixture
+class FullProducerFixture : public IoFixture, public KeyChainFixture
{
protected:
ndn::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
@@ -89,4 +89,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 3cdfef5..c483d89 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -29,12 +29,12 @@
#include <array>
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Interest;
using ndn::Name;
-class FullSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
+class FullSyncFixture : public IoFixture, public KeyChainFixture
{
protected:
void
@@ -515,4 +515,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index d42d174..ad6a917 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -22,9 +22,9 @@
#include "tests/boost-test.hpp"
-namespace psync {
-namespace detail {
+namespace psync::tests {
+using namespace psync::detail;
using ndn::Name;
BOOST_AUTO_TEST_SUITE(TestIBLT)
@@ -220,5 +220,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace detail
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-partial-producer.cpp b/tests/test-partial-producer.cpp
index 5088915..86b510c 100644
--- a/tests/test-partial-producer.cpp
+++ b/tests/test-partial-producer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -25,12 +25,12 @@
#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Interest;
using ndn::Name;
-class PartialProducerFixture : public tests::KeyChainFixture
+class PartialProducerFixture : public KeyChainFixture
{
protected:
ndn::DummyClientFace m_face{m_keyChain, {true, true}};
@@ -142,4 +142,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index 0efe4c8..eb842f7 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -27,12 +27,12 @@
#include <array>
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Interest;
using ndn::Name;
-class PartialSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
+class PartialSyncFixture : public IoFixture, public KeyChainFixture
{
protected:
PartialSyncFixture()
@@ -449,4 +449,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index 468c1d4..11a2699 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -24,11 +24,11 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace psync {
+namespace psync::tests {
using ndn::Name;
-class ProducerBaseFixture : public tests::KeyChainFixture
+class ProducerBaseFixture : public KeyChainFixture
{
protected:
ndn::DummyClientFace m_face;
@@ -80,4 +80,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-segment-publisher.cpp b/tests/test-segment-publisher.cpp
index e363523..25db644 100644
--- a/tests/test-segment-publisher.cpp
+++ b/tests/test-segment-publisher.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -28,13 +28,13 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
#include <ndn-cxx/util/segment-fetcher.hpp>
-namespace psync {
+namespace psync::tests {
using namespace ndn::time_literals;
using ndn::Interest;
using ndn::Name;
-class SegmentPublisherFixture : public tests::IoFixture, public tests::KeyChainFixture
+class SegmentPublisherFixture : public IoFixture, public KeyChainFixture
{
protected:
SegmentPublisherFixture()
@@ -164,4 +164,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-state.cpp b/tests/test-state.cpp
index 0e31a67..683ff73 100644
--- a/tests/test-state.cpp
+++ b/tests/test-state.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -23,8 +23,9 @@
#include <ndn-cxx/data.hpp>
-namespace psync {
-namespace detail {
+namespace psync::tests {
+
+using detail::State;
BOOST_AUTO_TEST_SUITE(TestState)
@@ -84,5 +85,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace detail
-} // namespace psync
+} // namespace psync::tests
diff --git a/tests/test-util.cpp b/tests/test-util.cpp
index 8020fe4..4053488 100644
--- a/tests/test-util.cpp
+++ b/tests/test-util.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, The University of Memphis
+ * Copyright (c) 2014-2024, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -21,16 +21,21 @@
#include "tests/boost-test.hpp"
-namespace psync {
-namespace detail {
+namespace psync::tests {
+
+using namespace psync::detail;
BOOST_AUTO_TEST_SUITE(TestUtil)
BOOST_AUTO_TEST_CASE(Compression)
{
- std::vector<CompressionScheme> available = {CompressionScheme::ZLIB, CompressionScheme::GZIP,
- CompressionScheme::BZIP2, CompressionScheme::LZMA,
- CompressionScheme::ZSTD};
+ const std::vector<CompressionScheme> available{
+ CompressionScheme::ZLIB,
+ CompressionScheme::GZIP,
+ CompressionScheme::BZIP2,
+ CompressionScheme::LZMA,
+ CompressionScheme::ZSTD
+ };
std::vector<CompressionScheme> supported;
std::vector<CompressionScheme> notSupported;
@@ -69,5 +74,4 @@
BOOST_AUTO_TEST_SUITE_END()
-} // namespace detail
-} // namespace psync
+} // namespace psync::tests