tests: Change to updated naming conventions
Change-Id: I9351c669282c3c02fd533237489beeb10fe7d15e
Refs: #2497
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 941166d..75ebe83 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 7d3ddde..cb01724 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 <http://www.gnu.org/licenses/>.
- **/
+ */
#include "core/config-file.hpp"
@@ -34,7 +35,7 @@
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 96%
rename from tests/core/global-io.cpp
rename to tests/core/global-io.t.cpp
index 7928056..8c7506c 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 97%
rename from tests/core/logger.cpp
rename to tests/core/logger.t.cpp
index 50df279..5dafadb 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 <http://www.gnu.org/licenses/>.
- **/
+ */
#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.cpp
deleted file mode 100644
index 75f69c9..0000000
--- a/tests/core/ndebug.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- 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
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "common.hpp"
-
-#include "tests/test-common.hpp"
-
-namespace ndn {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(CoreNdebug)
-
-BOOST_AUTO_TEST_CASE(AssertFalse)
-{
-#ifndef _DEBUG
- // in release builds, assertion shouldn't execute
- BOOST_ASSERT(false);
-#endif
-}
-
-BOOST_AUTO_TEST_CASE(SideEffect)
-{
- int a = 1;
- BOOST_ASSERT((a = 2) > 0);
-#ifdef _DEBUG
- BOOST_CHECK_EQUAL(a, 2);
-#else
- BOOST_CHECK_EQUAL(a, 1);
-#endif
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace tests
-} // namespace ndn
diff --git a/tests/core/global-io.cpp b/tests/core/ndebug.t.cpp
similarity index 77%
copy from tests/core/global-io.cpp
copy to tests/core/ndebug.t.cpp
index 7928056..5ef4d1d 100644
--- a/tests/core/global-io.cpp
+++ b/tests/core/ndebug.t.cpp
@@ -23,30 +23,32 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/global-io.hpp"
+#include "common.hpp"
#include "tests/test-common.hpp"
-#include <boost/thread.hpp>
-
namespace nfd {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(CoreGlobalIo, BaseFixture)
+BOOST_AUTO_TEST_SUITE(TestNdebug)
-BOOST_AUTO_TEST_CASE(ThreadLocalGlobalIoService)
+BOOST_AUTO_TEST_CASE(AssertFalse)
{
- boost::asio::io_service* s1 = &getGlobalIoService();
- boost::asio::io_service* s2 = nullptr;
- boost::thread t([&s2] {
- s2 = &getGlobalIoService();
- });
+#ifndef _DEBUG
+ // in release builds, assertion shouldn't execute
+ BOOST_ASSERT(false);
+#endif
+}
- t.join();
-
- BOOST_CHECK(s1 != nullptr);
- BOOST_CHECK(s2 != nullptr);
- BOOST_CHECK(s1 != s2);
+BOOST_AUTO_TEST_CASE(SideEffect)
+{
+ int a = 1;
+ BOOST_ASSERT((a = 2) > 0);
+#ifdef _DEBUG
+ BOOST_CHECK_EQUAL(a, 2);
+#else
+ BOOST_CHECK_EQUAL(a, 1);
+#endif
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/core/network-interface.cpp b/tests/core/network-interface.t.cpp
similarity index 86%
rename from tests/core/network-interface.cpp
rename to tests/core/network-interface.t.cpp
index c26d46a..43436bb 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 <http://www.gnu.org/licenses/>.
- **/
+ */
#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 91%
rename from tests/core/network.cpp
rename to tests/core/network.t.cpp
index 866d0b7..74ceaac 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 e231427..8627834 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 bd5f989..6dd1598 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 279424e..fa9c4a7 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 15c02a9..45e6e06 100644
--- a/tests/core/scheduler.cpp
+++ b/tests/core/scheduler.t.cpp
@@ -42,7 +42,7 @@
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 94%
rename from tests/core/segment-publisher.cpp
rename to tests/core/segment-publisher.t.cpp
index be28aba..e0f8e40 100644
--- a/tests/core/segment-publisher.cpp
+++ b/tests/core/segment-publisher.t.cpp
@@ -35,10 +35,10 @@
NFD_LOG_INIT("SegmentPublisherTest");
template<int64_t N=10000>
-class TestSegmentPublisher : public SegmentPublisher<ndn::util::DummyClientFace>
+class SegmentPublisherTester : public SegmentPublisher<ndn::util::DummyClientFace>
{
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 @@
}
virtual
- ~TestSegmentPublisher()
+ ~SegmentPublisherTester()
{
}
@@ -138,7 +138,7 @@
protected:
shared_ptr<ndn::util::DummyClientFace> m_face;
const time::milliseconds m_expectedFreshnessPeriod;
- TestSegmentPublisher<N> m_publisher;
+ SegmentPublisherTester<N> m_publisher;
ndn::EncodingBuffer m_buffer;
ndn::KeyChain m_keyChain;
};
@@ -146,7 +146,7 @@
using boost::mpl::int_;
typedef boost::mpl::vector<int_<10000>, 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<T::value>)
{
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 9fe3851..a8f985d 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");