diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh index a02a94c3..b4bf79aa 100755 --- a/.jenkins.d/20-tests.sh +++ b/.jenkins.d/20-tests.sh @@ -25,7 +25,7 @@ ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert - # Run unit tests # Core ./build/unit-tests-core -l test_suite -sudo ./build/unit-tests-core -t CorePrivilegeHelper -l test_suite +sudo ./build/unit-tests-core -t TestPrivilegeHelper -l test_suite # Daemon ./build/unit-tests-daemon -l test_suite diff --git a/AUTHORS.md b/AUTHORS.md index 828df04a..4787bd40 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -72,3 +72,4 @@ people who have reported bugs, submitted patches, and implemented new features in the library: * Tai-Lin Chu +* Spyridon Mastorakis diff --git a/tests/core/algorithm.cpp b/tests/core/algorithm.t.cpp similarity index 97% rename from tests/core/algorithm.cpp rename to tests/core/algorithm.t.cpp index 941166de..75ebe832 100644 --- a/tests/core/algorithm.cpp +++ b/tests/core/algorithm.t.cpp @@ -30,7 +30,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreAlgorithm, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestAlgorithm, BaseFixture) BOOST_AUTO_TEST_CASE(FindLastIf) { diff --git a/tests/core/config-file.cpp b/tests/core/config-file.t.cpp similarity index 94% rename from tests/core/config-file.cpp rename to tests/core/config-file.t.cpp index 7d3dddeb..cb017241 100644 --- a/tests/core/config-file.cpp +++ b/tests/core/config-file.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "core/config-file.hpp" @@ -34,7 +35,7 @@ namespace tests { NFD_LOG_INIT("ConfigFileTest"); -BOOST_FIXTURE_TEST_SUITE(MgmtConfigFile, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestConfigFile, BaseFixture) // a // { diff --git a/tests/core/global-io.cpp b/tests/core/global-io.t.cpp similarity index 97% rename from tests/core/global-io.cpp rename to tests/core/global-io.t.cpp index 7928056c..8c7506cf 100644 --- a/tests/core/global-io.cpp +++ b/tests/core/global-io.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreGlobalIo, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestGlobalIo, BaseFixture) BOOST_AUTO_TEST_CASE(ThreadLocalGlobalIoService) { diff --git a/tests/core/logger.cpp b/tests/core/logger.t.cpp similarity index 98% rename from tests/core/logger.cpp rename to tests/core/logger.t.cpp index 50df2795..5dafadb6 100644 --- a/tests/core/logger.cpp +++ b/tests/core/logger.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "core/logger.hpp" @@ -32,7 +33,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreLogger, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestLogger, BaseFixture) class LoggerFixture : protected BaseFixture { diff --git a/tests/core/ndebug.cpp b/tests/core/ndebug.t.cpp similarity index 71% rename from tests/core/ndebug.cpp rename to tests/core/ndebug.t.cpp index 75f69c91..5ef4d1db 100644 --- a/tests/core/ndebug.cpp +++ b/tests/core/ndebug.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -27,10 +27,10 @@ #include "tests/test-common.hpp" -namespace ndn { +namespace nfd { namespace tests { -BOOST_AUTO_TEST_SUITE(CoreNdebug) +BOOST_AUTO_TEST_SUITE(TestNdebug) BOOST_AUTO_TEST_CASE(AssertFalse) { @@ -54,4 +54,4 @@ BOOST_AUTO_TEST_CASE(SideEffect) BOOST_AUTO_TEST_SUITE_END() } // namespace tests -} // namespace ndn +} // namespace nfd diff --git a/tests/core/network-interface.cpp b/tests/core/network-interface.t.cpp similarity index 87% rename from tests/core/network-interface.cpp rename to tests/core/network-interface.t.cpp index c26d46a6..43436bbf 100644 --- a/tests/core/network-interface.cpp +++ b/tests/core/network-interface.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "core/network-interface.hpp" #include "tests/test-common.hpp" @@ -28,7 +29,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreNetworkInterface, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestNetworkInterface, BaseFixture) BOOST_AUTO_TEST_CASE(ListRealNetworkInterfaces) { diff --git a/tests/core/network.cpp b/tests/core/network.t.cpp similarity index 92% rename from tests/core/network.cpp rename to tests/core/network.t.cpp index 866d0b70..74ceaacb 100644 --- a/tests/core/network.cpp +++ b/tests/core/network.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -30,7 +30,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreNetwork, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestNetwork, BaseFixture) using boost::asio::ip::address; diff --git a/tests/core/notification-stream.cpp b/tests/core/notification-stream.t.cpp similarity index 81% rename from tests/core/notification-stream.cpp rename to tests/core/notification-stream.t.cpp index e2314274..8627834f 100644 --- a/tests/core/notification-stream.cpp +++ b/tests/core/notification-stream.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -32,7 +32,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreNotificationStream, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestNotificationStream, BaseFixture) BOOST_AUTO_TEST_CASE(Post) { diff --git a/tests/core/privilege-helper.cpp b/tests/core/privilege-helper.t.cpp similarity index 97% rename from tests/core/privilege-helper.cpp rename to tests/core/privilege-helper.t.cpp index bd5f9892..6dd15981 100644 --- a/tests/core/privilege-helper.cpp +++ b/tests/core/privilege-helper.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CorePrivilegeHelper, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestPrivilegeHelper, BaseFixture) BOOST_AUTO_TEST_CASE(DropRaise) { diff --git a/tests/core/random.t.cpp b/tests/core/random.t.cpp index 279424e7..fa9c4a7b 100644 --- a/tests/core/random.t.cpp +++ b/tests/core/random.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreRandom, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestRandom, BaseFixture) BOOST_AUTO_TEST_CASE(ThreadLocalRandon) { diff --git a/tests/core/scheduler.cpp b/tests/core/scheduler.t.cpp similarity index 98% rename from tests/core/scheduler.cpp rename to tests/core/scheduler.t.cpp index 15c02a94..45e6e068 100644 --- a/tests/core/scheduler.cpp +++ b/tests/core/scheduler.t.cpp @@ -42,7 +42,7 @@ namespace tests { using scheduler::EventId; using scheduler::ScopedEventId; -BOOST_FIXTURE_TEST_SUITE(CoreScheduler, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestScheduler, BaseFixture) class SchedulerFixture : protected BaseFixture { diff --git a/tests/core/segment-publisher.cpp b/tests/core/segment-publisher.t.cpp similarity index 95% rename from tests/core/segment-publisher.cpp rename to tests/core/segment-publisher.t.cpp index be28abab..e0f8e400 100644 --- a/tests/core/segment-publisher.cpp +++ b/tests/core/segment-publisher.t.cpp @@ -35,10 +35,10 @@ namespace tests { NFD_LOG_INIT("SegmentPublisherTest"); template -class TestSegmentPublisher : public SegmentPublisher +class SegmentPublisherTester : public SegmentPublisher { public: - TestSegmentPublisher(ndn::util::DummyClientFace& face, + SegmentPublisherTester(ndn::util::DummyClientFace& face, const Name& prefix, ndn::KeyChain& keyChain, const time::milliseconds freshnessPeriod) @@ -49,7 +49,7 @@ public: } virtual - ~TestSegmentPublisher() + ~SegmentPublisherTester() { } @@ -138,7 +138,7 @@ public: protected: shared_ptr m_face; const time::milliseconds m_expectedFreshnessPeriod; - TestSegmentPublisher m_publisher; + SegmentPublisherTester m_publisher; ndn::EncodingBuffer m_buffer; ndn::KeyChain m_keyChain; }; @@ -146,7 +146,7 @@ protected: using boost::mpl::int_; typedef boost::mpl::vector, int_<100>, int_<10>, int_<0> > DatasetSizes; -BOOST_AUTO_TEST_SUITE(SegmentPublisher) +BOOST_AUTO_TEST_SUITE(TestSegmentPublisher) BOOST_FIXTURE_TEST_CASE_TEMPLATE(Generate, T, DatasetSizes, SegmentPublisherFixture) { diff --git a/tests/core/version.cpp b/tests/core/version.t.cpp similarity index 78% rename from tests/core/version.cpp rename to tests/core/version.t.cpp index 9fe3851b..a8f985df 100644 --- a/tests/core/version.cpp +++ b/tests/core/version.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -31,7 +31,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(CoreVersion, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestVersion, BaseFixture) NFD_LOG_INIT("VersionTest"); diff --git a/tests/daemon/face/ethernet.cpp b/tests/daemon/face/ethernet.t.cpp similarity index 100% rename from tests/daemon/face/ethernet.cpp rename to tests/daemon/face/ethernet.t.cpp diff --git a/tests/daemon/face/face-counters.cpp b/tests/daemon/face/face-counters.t.cpp similarity index 82% rename from tests/daemon/face/face-counters.cpp rename to tests/daemon/face/face-counters.t.cpp index 3be0d885..2d561139 100644 --- a/tests/daemon/face/face-counters.cpp +++ b/tests/daemon/face/face-counters.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "face/face-counters.hpp" #include "dummy-face.hpp" diff --git a/tests/daemon/face/face.cpp b/tests/daemon/face/face.t.cpp similarity index 100% rename from tests/daemon/face/face.cpp rename to tests/daemon/face/face.t.cpp diff --git a/tests/daemon/face/ndnlp.cpp b/tests/daemon/face/ndnlp.t.cpp similarity index 99% rename from tests/daemon/face/ndnlp.cpp rename to tests/daemon/face/ndnlp.t.cpp index 52091d3a..bf6edea4 100644 --- a/tests/daemon/face/ndnlp.cpp +++ b/tests/daemon/face/ndnlp.t.cpp @@ -32,8 +32,11 @@ #include namespace nfd { +namespace ndnlp { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FaceNdnlp, BaseFixture) BOOST_AUTO_TEST_CASE(SequenceBlock) @@ -289,4 +292,5 @@ BOOST_FIXTURE_TEST_CASE(ReassembleTimeout, ReassembleFixture) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace ndnlp } // namespace nfd diff --git a/tests/daemon/face/null.cpp b/tests/daemon/face/null-face.t.cpp similarity index 73% rename from tests/daemon/face/null.cpp rename to tests/daemon/face/null-face.t.cpp index db904103..83dfbf4a 100644 --- a/tests/daemon/face/null.cpp +++ b/tests/daemon/face/null-face.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -30,7 +30,7 @@ namespace nfd { namespace tests { -BOOST_FIXTURE_TEST_SUITE(FaceNull, BaseFixture) +BOOST_FIXTURE_TEST_SUITE(FaceNullFace, BaseFixture) BOOST_AUTO_TEST_CASE(Send) { diff --git a/tests/daemon/face/tcp.cpp b/tests/daemon/face/tcp.t.cpp similarity index 100% rename from tests/daemon/face/tcp.cpp rename to tests/daemon/face/tcp.t.cpp diff --git a/tests/daemon/face/udp.cpp b/tests/daemon/face/udp.t.cpp similarity index 100% rename from tests/daemon/face/udp.cpp rename to tests/daemon/face/udp.t.cpp diff --git a/tests/daemon/face/unix-stream.cpp b/tests/daemon/face/unix-stream.t.cpp similarity index 100% rename from tests/daemon/face/unix-stream.cpp rename to tests/daemon/face/unix-stream.t.cpp diff --git a/tests/daemon/face/websocket.cpp b/tests/daemon/face/websocket.t.cpp similarity index 100% rename from tests/daemon/face/websocket.cpp rename to tests/daemon/face/websocket.t.cpp diff --git a/tests/daemon/fw/access-strategy.cpp b/tests/daemon/fw/access-strategy.t.cpp similarity index 99% rename from tests/daemon/fw/access-strategy.cpp rename to tests/daemon/fw/access-strategy.t.cpp index 934dfcd2..732e0e83 100644 --- a/tests/daemon/fw/access-strategy.cpp +++ b/tests/daemon/fw/access-strategy.t.cpp @@ -29,8 +29,11 @@ #include "topology-tester.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + // This test suite tests AccessStrategy's behavior as a black box, // without accessing its internals. // @@ -350,4 +353,5 @@ BOOST_FIXTURE_TEST_CASE(PacketLoss, TwoLaptopsFixture) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/best-route-strategy2.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp similarity index 98% rename from tests/daemon/fw/best-route-strategy2.cpp rename to tests/daemon/fw/best-route-strategy2.t.cpp index 5357bc84..385e7740 100644 --- a/tests/daemon/fw/best-route-strategy2.cpp +++ b/tests/daemon/fw/best-route-strategy2.t.cpp @@ -30,8 +30,11 @@ #include "tests/daemon/face/dummy-face.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FwBestRouteStrategy2, UnitTestTimeFixture) BOOST_AUTO_TEST_CASE(Forward) @@ -129,4 +132,5 @@ BOOST_AUTO_TEST_CASE(Forward) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/broadcast-strategy.cpp b/tests/daemon/fw/broadcast-strategy.t.cpp similarity index 89% rename from tests/daemon/fw/broadcast-strategy.cpp rename to tests/daemon/fw/broadcast-strategy.t.cpp index cde9b44a..ad47daa7 100644 --- a/tests/daemon/fw/broadcast-strategy.cpp +++ b/tests/daemon/fw/broadcast-strategy.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "fw/broadcast-strategy.hpp" #include "strategy-tester.hpp" @@ -29,8 +30,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FwBroadcastStrategy, BaseFixture) BOOST_AUTO_TEST_CASE(Forward2) @@ -126,4 +130,5 @@ BOOST_AUTO_TEST_CASE(RejectLoopback) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/client-control-strategy.cpp b/tests/daemon/fw/client-control-strategy.t.cpp similarity index 87% rename from tests/daemon/fw/client-control-strategy.cpp rename to tests/daemon/fw/client-control-strategy.t.cpp index c76fb521..ee3a3626 100644 --- a/tests/daemon/fw/client-control-strategy.cpp +++ b/tests/daemon/fw/client-control-strategy.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "fw/client-control-strategy.hpp" #include "strategy-tester.hpp" @@ -29,8 +30,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FwClientControlStrategy, BaseFixture) BOOST_AUTO_TEST_CASE(Forward3) @@ -93,4 +97,5 @@ BOOST_AUTO_TEST_CASE(Forward3) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/face-table.cpp b/tests/daemon/fw/face-table.t.cpp similarity index 90% rename from tests/daemon/fw/face-table.cpp rename to tests/daemon/fw/face-table.t.cpp index b2bfab42..66100346 100644 --- a/tests/daemon/fw/face-table.cpp +++ b/tests/daemon/fw/face-table.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. diff --git a/tests/daemon/fw/forwarder.cpp b/tests/daemon/fw/forwarder.t.cpp similarity index 100% rename from tests/daemon/fw/forwarder.cpp rename to tests/daemon/fw/forwarder.t.cpp diff --git a/tests/daemon/fw/ncc-strategy.cpp b/tests/daemon/fw/ncc-strategy.t.cpp similarity index 99% rename from tests/daemon/fw/ncc-strategy.cpp rename to tests/daemon/fw/ncc-strategy.t.cpp index da70e864..a10fc47e 100644 --- a/tests/daemon/fw/ncc-strategy.cpp +++ b/tests/daemon/fw/ncc-strategy.t.cpp @@ -31,8 +31,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FwNccStrategy, UnitTestTimeFixture) // NccStrategy is fairly complex. @@ -310,4 +313,5 @@ BOOST_AUTO_TEST_CASE(Bug1998) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/retx-suppression.cpp b/tests/daemon/fw/retx-suppression.t.cpp similarity index 98% rename from tests/daemon/fw/retx-suppression.cpp rename to tests/daemon/fw/retx-suppression.t.cpp index bec696f2..2d1b1469 100644 --- a/tests/daemon/fw/retx-suppression.cpp +++ b/tests/daemon/fw/retx-suppression.t.cpp @@ -32,11 +32,10 @@ #include "tests/daemon/face/dummy-face.hpp" namespace nfd { +namespace fw { namespace tests { -using fw::RetxSuppression; -using fw::RetxSuppressionFixed; -using fw::RetxSuppressionExponential; +using namespace nfd::tests; BOOST_FIXTURE_TEST_SUITE(FwRetxSuppression, UnitTestTimeFixture) @@ -160,4 +159,5 @@ BOOST_AUTO_TEST_CASE(Exponential) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/rtt-estimator.cpp b/tests/daemon/fw/rtt-estimator.t.cpp similarity index 83% rename from tests/daemon/fw/rtt-estimator.cpp rename to tests/daemon/fw/rtt-estimator.t.cpp index b5af0ab9..1a19443f 100644 --- a/tests/daemon/fw/rtt-estimator.cpp +++ b/tests/daemon/fw/rtt-estimator.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "fw/rtt-estimator.hpp" diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp index 980144df..9cf4855d 100644 --- a/tests/daemon/fw/strategy-tester.hpp +++ b/tests/daemon/fw/strategy-tester.hpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -30,6 +30,7 @@ #include "fw/strategy.hpp" namespace nfd { +namespace fw { namespace tests { /** \class StrategyTester @@ -88,6 +89,7 @@ StrategyTester::rejectPendingInterest(shared_ptr pitEntry) } } // namespace tests +} // namespace fw } // namespace nfd #endif // NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP diff --git a/tests/daemon/fw/strategy.cpp b/tests/daemon/fw/strategy.t.cpp similarity index 84% rename from tests/daemon/fw/strategy.cpp rename to tests/daemon/fw/strategy.t.cpp index 066b2809..44fead20 100644 --- a/tests/daemon/fw/strategy.cpp +++ b/tests/daemon/fw/strategy.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -31,8 +31,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace fw { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(FwStrategy, BaseFixture) class FaceTableAccessTestStrategy : public DummyStrategy @@ -94,4 +97,5 @@ BOOST_AUTO_TEST_CASE(FaceTableAccess) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace fw } // namespace nfd diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp index f343738e..16a1173e 100644 --- a/tests/daemon/fw/topology-tester.hpp +++ b/tests/daemon/fw/topology-tester.hpp @@ -37,9 +37,11 @@ #include "../face/dummy-face.hpp" namespace nfd { +namespace fw { namespace tests { using ndn::util::DummyClientFace; +using namespace nfd::tests; /** \brief identifies a node (forwarder) in the topology */ @@ -361,6 +363,7 @@ private: }; } // namespace tests +} // namespace fw } // namespace nfd #endif // NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP diff --git a/tests/daemon/mgmt/channel-status-publisher.cpp b/tests/daemon/mgmt/channel-status-publisher.t.cpp similarity index 100% rename from tests/daemon/mgmt/channel-status-publisher.cpp rename to tests/daemon/mgmt/channel-status-publisher.t.cpp diff --git a/tests/daemon/mgmt/command-validator.cpp b/tests/daemon/mgmt/command-validator.t.cpp similarity index 97% rename from tests/daemon/mgmt/command-validator.cpp rename to tests/daemon/mgmt/command-validator.t.cpp index ac32a6e9..f29ff6d2 100644 --- a/tests/daemon/mgmt/command-validator.cpp +++ b/tests/daemon/mgmt/command-validator.t.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -20,7 +21,7 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "mgmt/command-validator.hpp" #include "core/config-file.hpp" @@ -33,7 +34,6 @@ #include namespace nfd { - namespace tests { NFD_LOG_INIT("CommandValidatorTest"); @@ -653,5 +653,4 @@ BOOST_FIXTURE_TEST_CASE(Wildcard, TwoValidatorFixture) BOOST_AUTO_TEST_SUITE_END() } // namespace tests - } // namespace nfd diff --git a/tests/daemon/mgmt/face-manager.cpp b/tests/daemon/mgmt/face-manager.t.cpp similarity index 100% rename from tests/daemon/mgmt/face-manager.cpp rename to tests/daemon/mgmt/face-manager.t.cpp diff --git a/tests/daemon/mgmt/face-query-status-publisher.cpp b/tests/daemon/mgmt/face-query-status-publisher.t.cpp similarity index 91% rename from tests/daemon/mgmt/face-query-status-publisher.cpp rename to tests/daemon/mgmt/face-query-status-publisher.t.cpp index 948ee881..076c3840 100644 --- a/tests/daemon/mgmt/face-query-status-publisher.cpp +++ b/tests/daemon/mgmt/face-query-status-publisher.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -30,7 +30,7 @@ namespace tests { NFD_LOG_INIT("FaceQueryStatusPublisherTest"); -BOOST_FIXTURE_TEST_SUITE(MgmtFaceQuerySatusPublisher, FaceQueryStatusPublisherFixture) +BOOST_FIXTURE_TEST_SUITE(MgmtFaceQueryStatusPublisher, FaceQueryStatusPublisherFixture) BOOST_AUTO_TEST_CASE(NoConditionFilter) { diff --git a/tests/daemon/mgmt/face-status-publisher.cpp b/tests/daemon/mgmt/face-status-publisher.t.cpp similarity index 96% rename from tests/daemon/mgmt/face-status-publisher.cpp rename to tests/daemon/mgmt/face-status-publisher.t.cpp index 5a8bdd0f..0843881b 100644 --- a/tests/daemon/mgmt/face-status-publisher.cpp +++ b/tests/daemon/mgmt/face-status-publisher.t.cpp @@ -30,7 +30,7 @@ namespace tests { NFD_LOG_INIT("FaceStatusPublisherTest"); -BOOST_FIXTURE_TEST_SUITE(MgmtFaceSatusPublisher, FaceStatusPublisherFixture) +BOOST_FIXTURE_TEST_SUITE(MgmtFaceStatusPublisher, FaceStatusPublisherFixture) BOOST_AUTO_TEST_CASE(EncodingDecoding) { diff --git a/tests/daemon/mgmt/fib-enumeration-publisher.cpp b/tests/daemon/mgmt/fib-enumeration-publisher.t.cpp similarity index 97% rename from tests/daemon/mgmt/fib-enumeration-publisher.cpp rename to tests/daemon/mgmt/fib-enumeration-publisher.t.cpp index 0a79fdb4..62ea6a7d 100644 --- a/tests/daemon/mgmt/fib-enumeration-publisher.cpp +++ b/tests/daemon/mgmt/fib-enumeration-publisher.t.cpp @@ -40,9 +40,7 @@ namespace tests { NFD_LOG_INIT("TestFibEnumerationPublisher"); - - -BOOST_FIXTURE_TEST_SUITE(MgmtFibEnumeration, FibEnumerationPublisherFixture) +BOOST_FIXTURE_TEST_SUITE(MgmtFibEnumerationPublisher, FibEnumerationPublisherFixture) BOOST_AUTO_TEST_CASE(TestFibEnumerationPublisher) { diff --git a/tests/daemon/mgmt/fib-manager.cpp b/tests/daemon/mgmt/fib-manager.t.cpp similarity index 100% rename from tests/daemon/mgmt/fib-manager.cpp rename to tests/daemon/mgmt/fib-manager.t.cpp diff --git a/tests/daemon/mgmt/general-config-section.cpp b/tests/daemon/mgmt/general-config-section.t.cpp similarity index 98% rename from tests/daemon/mgmt/general-config-section.cpp rename to tests/daemon/mgmt/general-config-section.t.cpp index b18e2743..83063b95 100644 --- a/tests/daemon/mgmt/general-config-section.cpp +++ b/tests/daemon/mgmt/general-config-section.t.cpp @@ -29,8 +29,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace general { namespace tests { +using namespace nfd::tests; + class GeneralConfigSectionFixture : public BaseFixture { public: @@ -144,5 +147,5 @@ BOOST_AUTO_TEST_CASE(InvalidGroupConfig) BOOST_AUTO_TEST_SUITE_END() } // namespace tests - +} // namespace general } // namespace nfd diff --git a/tests/daemon/mgmt/internal-face.cpp b/tests/daemon/mgmt/internal-face.t.cpp similarity index 100% rename from tests/daemon/mgmt/internal-face.cpp rename to tests/daemon/mgmt/internal-face.t.cpp diff --git a/tests/daemon/mgmt/manager-base.cpp b/tests/daemon/mgmt/manager-base.t.cpp similarity index 100% rename from tests/daemon/mgmt/manager-base.cpp rename to tests/daemon/mgmt/manager-base.t.cpp diff --git a/tests/daemon/mgmt/status-server.cpp b/tests/daemon/mgmt/status-server.t.cpp similarity index 100% rename from tests/daemon/mgmt/status-server.cpp rename to tests/daemon/mgmt/status-server.t.cpp diff --git a/tests/daemon/mgmt/strategy-choice-manager.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp similarity index 100% rename from tests/daemon/mgmt/strategy-choice-manager.cpp rename to tests/daemon/mgmt/strategy-choice-manager.t.cpp diff --git a/tests/daemon/mgmt/strategy-choice-publisher.cpp b/tests/daemon/mgmt/strategy-choice-publisher.t.cpp similarity index 100% rename from tests/daemon/mgmt/strategy-choice-publisher.cpp rename to tests/daemon/mgmt/strategy-choice-publisher.t.cpp diff --git a/tests/daemon/mgmt/tables-config-section.cpp b/tests/daemon/mgmt/tables-config-section.t.cpp similarity index 95% rename from tests/daemon/mgmt/tables-config-section.cpp rename to tests/daemon/mgmt/tables-config-section.t.cpp index 51292876..17351544 100644 --- a/tests/daemon/mgmt/tables-config-section.cpp +++ b/tests/daemon/mgmt/tables-config-section.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. @@ -82,7 +82,7 @@ protected: ConfigFile m_config; }; -BOOST_FIXTURE_TEST_SUITE(TestTableConfigSection, TablesConfigSectionFixture) +BOOST_FIXTURE_TEST_SUITE(MgmtTableConfigSection, TablesConfigSectionFixture) BOOST_AUTO_TEST_CASE(ConfigureTablesWithDefaults) { diff --git a/tests/daemon/table/cs.cpp b/tests/daemon/table/cs.t.cpp similarity index 99% rename from tests/daemon/table/cs.cpp rename to tests/daemon/table/cs.t.cpp index e9efddf5..6d69eda1 100644 --- a/tests/daemon/table/cs.cpp +++ b/tests/daemon/table/cs.t.cpp @@ -29,8 +29,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace cs { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(TableCs, BaseFixture) class FindFixture : protected BaseFixture @@ -436,4 +439,5 @@ BOOST_AUTO_TEST_CASE(Enumeration) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace cs } // namespace nfd diff --git a/tests/daemon/table/dead-nonce-list.cpp b/tests/daemon/table/dead-nonce-list.t.cpp similarity index 100% rename from tests/daemon/table/dead-nonce-list.cpp rename to tests/daemon/table/dead-nonce-list.t.cpp diff --git a/tests/daemon/table/fib.cpp b/tests/daemon/table/fib.t.cpp similarity index 96% rename from tests/daemon/table/fib.cpp rename to tests/daemon/table/fib.t.cpp index d75088bf..59a88e99 100644 --- a/tests/daemon/table/fib.cpp +++ b/tests/daemon/table/fib.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. diff --git a/tests/daemon/table/measurements-accessor.cpp b/tests/daemon/table/measurements-accessor.t.cpp similarity index 100% rename from tests/daemon/table/measurements-accessor.cpp rename to tests/daemon/table/measurements-accessor.t.cpp diff --git a/tests/daemon/table/measurements.cpp b/tests/daemon/table/measurements.t.cpp similarity index 100% rename from tests/daemon/table/measurements.cpp rename to tests/daemon/table/measurements.t.cpp diff --git a/tests/daemon/table/name-tree.cpp b/tests/daemon/table/name-tree.t.cpp similarity index 97% rename from tests/daemon/table/name-tree.cpp rename to tests/daemon/table/name-tree.t.cpp index 97905968..de7ecbb1 100644 --- a/tests/daemon/table/name-tree.cpp +++ b/tests/daemon/table/name-tree.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. diff --git a/tests/daemon/table/pit.cpp b/tests/daemon/table/pit.t.cpp similarity index 99% rename from tests/daemon/table/pit.cpp rename to tests/daemon/table/pit.t.cpp index 5de6fe37..7bd89fc2 100644 --- a/tests/daemon/table/pit.cpp +++ b/tests/daemon/table/pit.t.cpp @@ -29,8 +29,11 @@ #include "tests/test-common.hpp" namespace nfd { +namespace pit { namespace tests { +using namespace nfd::tests; + BOOST_FIXTURE_TEST_SUITE(TablePit, BaseFixture) BOOST_AUTO_TEST_CASE(EntryInOutRecords) @@ -495,4 +498,5 @@ BOOST_AUTO_TEST_CASE(Iterator) BOOST_AUTO_TEST_SUITE_END() } // namespace tests +} // namespace pit } // namespace nfd diff --git a/tests/daemon/table/strategy-choice.cpp b/tests/daemon/table/strategy-choice.t.cpp similarity index 96% rename from tests/daemon/table/strategy-choice.cpp rename to tests/daemon/table/strategy-choice.t.cpp index 494c76b8..ec450f57 100644 --- a/tests/daemon/table/strategy-choice.cpp +++ b/tests/daemon/table/strategy-choice.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. diff --git a/tests/daemon/table/strategy-info-host.cpp b/tests/daemon/table/strategy-info-host.t.cpp similarity index 89% rename from tests/daemon/table/strategy-info-host.cpp rename to tests/daemon/table/strategy-info-host.t.cpp index 5c0c14fa..746d51a9 100644 --- a/tests/daemon/table/strategy-info-host.cpp +++ b/tests/daemon/table/strategy-info-host.t.cpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, Regents of the University of California, - * Arizona Board of Regents, - * Colorado State University, - * University Pierre & Marie Curie, Sorbonne University, - * Washington University in St. Louis, - * Beijing Institute of Technology, - * The University of Memphis + * Copyright (c) 2014-2015, Regents of the University of California, + * Arizona Board of Regents, + * Colorado State University, + * University Pierre & Marie Curie, Sorbonne University, + * Washington University in St. Louis, + * Beijing Institute of Technology, + * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. diff --git a/tests/rib/fib-updates-erase-face.cpp b/tests/rib/fib-updates-erase-face.t.cpp similarity index 99% rename from tests/rib/fib-updates-erase-face.cpp rename to tests/rib/fib-updates-erase-face.t.cpp index a037b44c..39e313d8 100644 --- a/tests/rib/fib-updates-erase-face.cpp +++ b/tests/rib/fib-updates-erase-face.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(FibUpdates, FibUpdatesFixture) +BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture) BOOST_AUTO_TEST_SUITE(EraseFace) diff --git a/tests/rib/fib-updates-new-face.cpp b/tests/rib/fib-updates-new-face.t.cpp similarity index 99% rename from tests/rib/fib-updates-new-face.cpp rename to tests/rib/fib-updates-new-face.t.cpp index e5128d8b..850e8ae1 100644 --- a/tests/rib/fib-updates-new-face.cpp +++ b/tests/rib/fib-updates-new-face.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(FibUpdates, FibUpdatesFixture) +BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture) BOOST_AUTO_TEST_SUITE(NewFace) diff --git a/tests/rib/fib-updates-new-namespace.cpp b/tests/rib/fib-updates-new-namespace.t.cpp similarity index 99% rename from tests/rib/fib-updates-new-namespace.cpp rename to tests/rib/fib-updates-new-namespace.t.cpp index f44d286c..e42271f0 100644 --- a/tests/rib/fib-updates-new-namespace.cpp +++ b/tests/rib/fib-updates-new-namespace.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(FibUpdates, FibUpdatesFixture) +BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture) BOOST_AUTO_TEST_SUITE(NewNamespace) diff --git a/tests/rib/fib-updates-update-face.cpp b/tests/rib/fib-updates-update-face.t.cpp similarity index 99% rename from tests/rib/fib-updates-update-face.cpp rename to tests/rib/fib-updates-update-face.t.cpp index 2850cc3e..af49188f 100644 --- a/tests/rib/fib-updates-update-face.cpp +++ b/tests/rib/fib-updates-update-face.t.cpp @@ -32,7 +32,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(FibUpdates, FibUpdatesFixture) +BOOST_FIXTURE_TEST_SUITE(TestFibUpdates, FibUpdatesFixture) BOOST_AUTO_TEST_SUITE(UpdateFace) diff --git a/tests/rib/remote-registrator.cpp b/tests/rib/remote-registrator.t.cpp similarity index 99% rename from tests/rib/remote-registrator.cpp rename to tests/rib/remote-registrator.t.cpp index 9caf3455..5c81f880 100644 --- a/tests/rib/remote-registrator.cpp +++ b/tests/rib/remote-registrator.t.cpp @@ -204,7 +204,7 @@ public: const name::Component RemoteRegistratorFixture::DEFAULT_APP_NAME("app"); -BOOST_FIXTURE_TEST_SUITE(RemoteRegistrator, RemoteRegistratorFixture) +BOOST_FIXTURE_TEST_SUITE(TestRemoteRegistrator, RemoteRegistratorFixture) BOOST_FIXTURE_TEST_CASE(AutoTest, RemoteRegistratorFixture) { diff --git a/tests/rib/rib-manager.cpp b/tests/rib/rib-manager.t.cpp similarity index 99% rename from tests/rib/rib-manager.cpp rename to tests/rib/rib-manager.t.cpp index 1d21bdb2..9b31996d 100644 --- a/tests/rib/rib-manager.cpp +++ b/tests/rib/rib-manager.t.cpp @@ -117,7 +117,7 @@ public: typedef RibManagerFixture UnauthorizedRibManager; -BOOST_FIXTURE_TEST_SUITE(RibManager, RibManagerFixture) +BOOST_FIXTURE_TEST_SUITE(TestRibManager, RibManagerFixture) BOOST_FIXTURE_TEST_CASE(ShortName, AuthorizedRibManager) { diff --git a/tests/rib/rib-status-publisher.cpp b/tests/rib/rib-status-publisher.t.cpp similarity index 96% rename from tests/rib/rib-status-publisher.cpp rename to tests/rib/rib-status-publisher.t.cpp index 59e3fe79..55ba64f1 100644 --- a/tests/rib/rib-status-publisher.cpp +++ b/tests/rib/rib-status-publisher.t.cpp @@ -33,7 +33,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(RibStatusPublisherSuite, RibStatusPublisherFixture) +BOOST_FIXTURE_TEST_SUITE(TestRibStatusPublisher, RibStatusPublisherFixture) BOOST_AUTO_TEST_CASE(Basic) { diff --git a/tests/rib/rib.cpp b/tests/rib/rib.t.cpp similarity index 99% rename from tests/rib/rib.cpp rename to tests/rib/rib.t.cpp index a88dc2bf..12b62080 100644 --- a/tests/rib/rib.cpp +++ b/tests/rib/rib.t.cpp @@ -31,7 +31,7 @@ namespace nfd { namespace rib { namespace tests { -BOOST_FIXTURE_TEST_SUITE(Rib, nfd::tests::BaseFixture) +BOOST_FIXTURE_TEST_SUITE(TestRib, nfd::tests::BaseFixture) BOOST_AUTO_TEST_CASE(RibEntry) { diff --git a/tests/test-case.cpp.sample b/tests/test-case.t.cpp.sample similarity index 88% rename from tests/test-case.cpp.sample rename to tests/test-case.t.cpp.sample index 560add27..f264e6a1 100644 --- a/tests/test-case.cpp.sample +++ b/tests/test-case.t.cpp.sample @@ -25,6 +25,8 @@ // #include "unit-under-test.hpp" // Unit being tested MUST be included first, to ensure header compiles on its own. +// For further information about test naming conventions, see +// http://redmine.named-data.net/projects/nfd/wiki/UnitTesting #include "tests/test-common.hpp" @@ -38,9 +40,9 @@ BOOST_FIXTURE_TEST_SUITE(TestSkeleton, BaseFixture) BOOST_AUTO_TEST_CASE(Test1) { int i = 0; - /** - * For reference of available Boost.Test macros, @see http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/utf/testing-tools/reference.html - */ + + // For reference of available Boost.Test macros, see + // http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/utf/testing-tools/reference.html BOOST_REQUIRE_NO_THROW(i = 1); BOOST_REQUIRE_EQUAL(i, 1); diff --git a/tests/wscript b/tests/wscript index c2cc5366..7cfe4d26 100644 --- a/tests/wscript +++ b/tests/wscript @@ -62,8 +62,8 @@ def build(bld): target='../unit-tests-daemon', features='cxx cxxprogram', source=bld.path.ant_glob(['daemon/**/*.cpp'], - excl=['daemon/face/ethernet.cpp', - 'daemon/face/unix-*.cpp', + excl=['daemon/face/ethernet*.cpp', + 'daemon/face/unix*.cpp', 'daemon/face/websocket*.cpp']), use='daemon-objects unit-tests-base unit-tests-main', includes='.', @@ -71,10 +71,10 @@ def build(bld): ) if bld.env['HAVE_LIBPCAP']: - unit_tests_nfd.source += bld.path.ant_glob('daemon/face/ethernet.cpp') + unit_tests_nfd.source += bld.path.ant_glob('daemon/face/ethernet*.cpp') if bld.env['HAVE_UNIX_SOCKETS']: - unit_tests_nfd.source += bld.path.ant_glob('daemon/face/unix-*.cpp') + unit_tests_nfd.source += bld.path.ant_glob('daemon/face/unix*.cpp') if bld.env['HAVE_WEBSOCKET']: unit_tests_nfd.source += bld.path.ant_glob('daemon/face/websocket*.cpp')