Skip to content

Commit

Permalink
tests: move to namespace psync::tests
Browse files Browse the repository at this point in the history
Change-Id: I462563e8f3d60fbf2a124bad4e412665adeb8186
  • Loading branch information
Pesa committed Feb 13, 2024
1 parent 8d6192a commit 47eb6d9
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 49 deletions.
10 changes: 5 additions & 5 deletions 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.
Expand All @@ -23,8 +23,9 @@

#include <ndn-cxx/name.hpp>

namespace psync {
namespace detail {
namespace psync::tests {

using detail::BloomFilter;

BOOST_AUTO_TEST_SUITE(TestBloomFilter)

Expand Down Expand Up @@ -55,5 +56,4 @@ BOOST_AUTO_TEST_CASE(NameAppendAndExtract)

BOOST_AUTO_TEST_SUITE_END()

} // namespace detail
} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand All @@ -24,7 +24,7 @@

#include <ndn-cxx/util/dummy-client-face.hpp>

namespace psync {
namespace psync::tests {

using ndn::Name;

Expand Down Expand Up @@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(RemoveSubscription)
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;
Expand All @@ -84,4 +84,4 @@ BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, tests::IoFixture)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand All @@ -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}};
Expand Down Expand Up @@ -89,4 +89,4 @@ BOOST_AUTO_TEST_CASE(OnSyncDataDecodeFailure)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
6 changes: 3 additions & 3 deletions tests/test-full-sync.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -515,4 +515,4 @@ BOOST_AUTO_TEST_CASE(DelayedSecondSegment)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
7 changes: 3 additions & 4 deletions tests/test-iblt.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -220,5 +220,4 @@ BOOST_AUTO_TEST_CASE(DifferenceBwOversizedIBFs)

BOOST_AUTO_TEST_SUITE_END()

} // namespace detail
} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand All @@ -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}};
Expand Down Expand Up @@ -142,4 +142,4 @@ BOOST_AUTO_TEST_CASE(OnSyncInterest)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand All @@ -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()
Expand Down Expand Up @@ -449,4 +449,4 @@ BOOST_AUTO_TEST_CASE(DelayedSubscription) // #5122

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand All @@ -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;
Expand Down Expand Up @@ -80,4 +80,4 @@ BOOST_AUTO_TEST_CASE(ApplicationNack)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
8 changes: 4 additions & 4 deletions 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.
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -164,4 +164,4 @@ BOOST_AUTO_TEST_CASE(LongerDataName)

BOOST_AUTO_TEST_SUITE_END()

} // namespace psync
} // namespace psync::tests
10 changes: 5 additions & 5 deletions 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.
Expand All @@ -23,8 +23,9 @@

#include <ndn-cxx/data.hpp>

namespace psync {
namespace detail {
namespace psync::tests {

using detail::State;

BOOST_AUTO_TEST_SUITE(TestState)

Expand Down Expand Up @@ -84,5 +85,4 @@ BOOST_AUTO_TEST_CASE(ReEncode)

BOOST_AUTO_TEST_SUITE_END()

} // namespace detail
} // namespace psync
} // namespace psync::tests
20 changes: 12 additions & 8 deletions 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.
Expand All @@ -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;

Expand Down Expand Up @@ -69,5 +74,4 @@ BOOST_AUTO_TEST_CASE(Compression)

BOOST_AUTO_TEST_SUITE_END()

} // namespace detail
} // namespace psync
} // namespace psync::tests

0 comments on commit 47eb6d9

Please sign in to comment.