tests: unit-tests-{core,tools} no longer require a global io_service
BaseFixture is moved to tests/daemon and renamed to GlobalIoFixture
Refs: #4528
Change-Id: If9184e9f7f1d6072b0103d3ea3ca6c31a9e505c8
diff --git a/tests/daemon/fw/access-strategy.t.cpp b/tests/daemon/fw/access-strategy.t.cpp
index 2f825be..d950fc2 100644
--- a/tests/daemon/fw/access-strategy.t.cpp
+++ b/tests/daemon/fw/access-strategy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,7 +25,6 @@
#include "fw/access-strategy.hpp"
-#include "tests/test-common.hpp"
#include "strategy-tester.hpp"
#include "topology-tester.hpp"
@@ -52,7 +51,7 @@
// code style rule 3.25. This is necessary because some lines ends with '\' which
// would cause "multi-line comment" compiler warning if '//' comments are used.
-class TwoLaptopsFixture : public UnitTestTimeFixture
+class TwoLaptopsFixture : public GlobalIoTimeFixture
{
protected:
TwoLaptopsFixture()
diff --git a/tests/daemon/fw/ad-hoc-forwarding.t.cpp b/tests/daemon/fw/ad-hoc-forwarding.t.cpp
index 7e81893..5ef50cf 100644
--- a/tests/daemon/fw/ad-hoc-forwarding.t.cpp
+++ b/tests/daemon/fw/ad-hoc-forwarding.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,8 +33,9 @@
#include "fw/best-route-strategy2.hpp"
#include "fw/multicast-strategy.hpp"
-#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "topology-tester.hpp"
+
#include <boost/mpl/vector.hpp>
namespace nfd {
@@ -44,7 +45,7 @@
using namespace nfd::tests;
template<typename S>
-class AdHocForwardingFixture : public UnitTestTimeFixture
+class AdHocForwardingFixture : public GlobalIoTimeFixture
{
protected:
AdHocForwardingFixture()
@@ -84,7 +85,7 @@
};
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestAdHocForwarding, BaseFixture)
+BOOST_AUTO_TEST_SUITE(TestAdHocForwarding)
using Strategies = boost::mpl::vector<
AsfStrategy,
diff --git a/tests/daemon/fw/algorithm.t.cpp b/tests/daemon/fw/algorithm.t.cpp
index 1e482c5..cb32efc 100644
--- a/tests/daemon/fw/algorithm.t.cpp
+++ b/tests/daemon/fw/algorithm.t.cpp
@@ -26,6 +26,7 @@
#include "fw/algorithm.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
namespace nfd {
@@ -35,9 +36,9 @@
using namespace nfd::tests;
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestAlgorithm, BaseFixture)
+BOOST_FIXTURE_TEST_SUITE(TestAlgorithm, GlobalIoFixture)
-class ScopeControlFixture : public BaseFixture
+class ScopeControlFixture : public GlobalIoFixture
{
protected:
ScopeControlFixture()
@@ -169,7 +170,7 @@
BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 19004, *face2), DUPLICATE_NONCE_NONE);
}
-BOOST_FIXTURE_TEST_CASE(HasPendingOutRecords, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(HasPendingOutRecords, GlobalIoTimeFixture)
{
auto face1 = make_shared<DummyFace>();
auto face2 = make_shared<DummyFace>();
@@ -204,7 +205,7 @@
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
}
-BOOST_FIXTURE_TEST_CASE(GetLastOutgoing, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(GetLastOutgoing, GlobalIoTimeFixture)
{
auto face1 = make_shared<DummyFace>();
auto face2 = make_shared<DummyFace>();
diff --git a/tests/daemon/fw/asf-measurements.t.cpp b/tests/daemon/fw/asf-measurements.t.cpp
index 71491b7..a5fee3f 100644
--- a/tests/daemon/fw/asf-measurements.t.cpp
+++ b/tests/daemon/fw/asf-measurements.t.cpp
@@ -26,8 +26,9 @@
#include "fw/asf-measurements.hpp"
#include "daemon/global.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
namespace nfd {
namespace fw {
@@ -41,7 +42,7 @@
BOOST_AUTO_TEST_SUITE(TestRttStats)
-BOOST_FIXTURE_TEST_CASE(Basic, BaseFixture)
+BOOST_FIXTURE_TEST_CASE(Basic, GlobalIoFixture)
{
RttStats stats;
@@ -82,7 +83,7 @@
BOOST_AUTO_TEST_SUITE(TestFaceInfo)
-BOOST_FIXTURE_TEST_CASE(Basic, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(Basic, GlobalIoTimeFixture)
{
FaceInfo info;
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 7e3de91..d363880 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -25,7 +25,6 @@
#include "fw/asf-strategy.hpp"
-#include "tests/test-common.hpp"
#include "strategy-tester.hpp"
#include "topology-tester.hpp"
@@ -41,9 +40,9 @@
NFD_REGISTER_STRATEGY(AsfStrategyTester);
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestAsfStrategy, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestAsfStrategy, GlobalIoTimeFixture)
-class AsfGridFixture : public UnitTestTimeFixture
+class AsfGridFixture : public GlobalIoTimeFixture
{
protected:
AsfGridFixture(Name parameters = AsfStrategy::getStrategyName())
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 83f9903..4101464 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -41,7 +41,7 @@
BOOST_AUTO_TEST_SUITE(Fw)
-class BestRouteStrategy2Fixture : public UnitTestTimeFixture
+class BestRouteStrategy2Fixture : public GlobalIoTimeFixture
{
protected:
BestRouteStrategy2Fixture()
diff --git a/tests/daemon/fw/face-table.t.cpp b/tests/daemon/fw/face-table.t.cpp
index 839018a..fc2e7ee 100644
--- a/tests/daemon/fw/face-table.t.cpp
+++ b/tests/daemon/fw/face-table.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,13 +26,14 @@
#include "fw/face-table.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
namespace nfd {
namespace tests {
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestFaceTable, BaseFixture)
+BOOST_FIXTURE_TEST_SUITE(TestFaceTable, GlobalIoFixture)
BOOST_AUTO_TEST_CASE(AddRemove)
{
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 60c8ea4..8e3bae3 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -27,6 +27,7 @@
#include "daemon/global.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
#include "choose-strategy.hpp"
#include "dummy-strategy.hpp"
@@ -37,7 +38,7 @@
namespace tests {
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestForwarder, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestForwarder, GlobalIoTimeFixture)
BOOST_AUTO_TEST_CASE(SimpleExchange)
{
@@ -534,7 +535,7 @@
BOOST_CHECK(face3->sentNacks.empty());
}
-BOOST_FIXTURE_TEST_CASE(InterestLoopWithShortLifetime, UnitTestTimeFixture) // Bug 1953
+BOOST_AUTO_TEST_CASE(InterestLoopWithShortLifetime) // Bug 1953
{
Forwarder forwarder;
auto face1 = make_shared<DummyFace>();
@@ -592,8 +593,8 @@
BOOST_CHECK_EQUAL(pit.size(), 0);
}
-BOOST_AUTO_TEST_SUITE_END()
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestForwarder
+BOOST_AUTO_TEST_SUITE_END() // Fw
} // namespace tests
} // namespace nfd
diff --git a/tests/daemon/fw/forwarding-hint.t.cpp b/tests/daemon/fw/forwarding-hint.t.cpp
index 7d0d37d..e37c267 100644
--- a/tests/daemon/fw/forwarding-hint.t.cpp
+++ b/tests/daemon/fw/forwarding-hint.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,7 @@
#include "fw/best-route-strategy2.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "topology-tester.hpp"
namespace nfd {
@@ -52,7 +53,7 @@
* /net/ndnsim
* (serverQ)
*/
-class NdnsimTeliaUclaTopologyFixture : public UnitTestTimeFixture
+class NdnsimTeliaUclaTopologyFixture : public GlobalIoTimeFixture
{
public:
NdnsimTeliaUclaTopologyFixture()
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index e3ed88b..a6d9be6 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -26,8 +26,8 @@
#include "fw/multicast-strategy.hpp"
#include "daemon/global.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
#include "strategy-tester.hpp"
namespace nfd {
@@ -39,7 +39,7 @@
typedef StrategyTester<MulticastStrategy> MulticastStrategyTester;
NFD_REGISTER_STRATEGY(MulticastStrategyTester);
-class MulticastStrategyFixture : public UnitTestTimeFixture
+class MulticastStrategyFixture : public GlobalIoTimeFixture
{
protected:
MulticastStrategyFixture()
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index 4044251..86238af 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -39,7 +39,7 @@
NFD_REGISTER_STRATEGY(NccStrategyTester);
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestNccStrategy, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestNccStrategy, GlobalIoTimeFixture)
BOOST_AUTO_TEST_CASE(FavorRespondingUpstream)
{
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 1e0b599..5467c4a 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -23,11 +23,11 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "dummy-strategy.hpp"
-#include "choose-strategy.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
-
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
+#include "choose-strategy.hpp"
+#include "dummy-strategy.hpp"
#include <ndn-cxx/lp/tags.hpp>
@@ -38,7 +38,7 @@
using namespace nfd::tests;
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestPitExpiry, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestPitExpiry, GlobalIoTimeFixture)
class PitExpiryTestStrategy : public DummyStrategy
{
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index c96ac67..a0aab02 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -28,6 +28,7 @@
#include "fw/retx-suppression-exponential.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
namespace nfd {
@@ -37,7 +38,7 @@
using namespace nfd::tests;
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestRetxSuppression, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestRetxSuppression, GlobalIoTimeFixture)
BOOST_AUTO_TEST_CASE(Fixed)
{
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index 3d61452..2708710 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -47,7 +47,7 @@
BOOST_AUTO_TEST_SUITE(Fw)
template<typename S>
-class StrategyNackReturnFixture : public UnitTestTimeFixture
+class StrategyNackReturnFixture : public GlobalIoTimeFixture
{
public:
StrategyNackReturnFixture()
@@ -189,7 +189,7 @@
// #3033 note-7
BOOST_FIXTURE_TEST_CASE_TEMPLATE(LiveDeadlock,
- S, Strategies, UnitTestTimeFixture)
+ S, Strategies, GlobalIoTimeFixture)
{
/*
* /----------\
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 6e8aa8a..daf3f2a 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -34,9 +34,10 @@
#include "fw/best-route-strategy2.hpp"
#include "fw/multicast-strategy.hpp"
+#include "tests/test-common.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
#include "choose-strategy.hpp"
#include "strategy-tester.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
#include <boost/mpl/copy_if.hpp>
#include <boost/mpl/vector.hpp>
@@ -48,7 +49,7 @@
using namespace nfd::tests;
template<typename S>
-class StrategyNoRouteFixture : public UnitTestTimeFixture
+class StrategyNoRouteFixture : public GlobalIoTimeFixture
{
public:
StrategyNoRouteFixture()
@@ -76,7 +77,7 @@
};
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestStrategyNoRoute, BaseFixture)
+BOOST_AUTO_TEST_SUITE(TestStrategyNoRoute)
template<typename S, typename C>
class Test
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index c97e8ab..2980834 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -35,9 +35,10 @@
#include "fw/multicast-strategy.hpp"
#include "fw/ncc-strategy.hpp"
+#include "tests/test-common.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
#include "choose-strategy.hpp"
#include "strategy-tester.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
#include <boost/mpl/copy_if.hpp>
#include <boost/mpl/vector.hpp>
@@ -49,7 +50,7 @@
using namespace nfd::tests;
template<typename S>
-class StrategyScopeControlFixture : public UnitTestTimeFixture
+class StrategyScopeControlFixture : public GlobalIoTimeFixture
{
public:
StrategyScopeControlFixture()
diff --git a/tests/daemon/fw/strategy.t.cpp b/tests/daemon/fw/strategy.t.cpp
index 11f3f38..41b0f8d 100644
--- a/tests/daemon/fw/strategy.t.cpp
+++ b/tests/daemon/fw/strategy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,14 +24,16 @@
*/
#include "fw/strategy.hpp"
-#include "dummy-strategy.hpp"
+
+#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
+#include "dummy-strategy.hpp"
+
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/algorithm/copy.hpp>
-#include "tests/test-common.hpp"
-
namespace nfd {
namespace fw {
namespace tests {
@@ -39,7 +41,7 @@
using namespace nfd::tests;
BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestStrategy, BaseFixture)
+BOOST_FIXTURE_TEST_SUITE(TestStrategy, GlobalIoFixture)
// Strategy registry is tested in table/strategy-choice.t.cpp and strategy-instantiation.t.cpp
diff --git a/tests/daemon/fw/unsolicited-data-policy.t.cpp b/tests/daemon/fw/unsolicited-data-policy.t.cpp
index e6b73ad..11eafe1 100644
--- a/tests/daemon/fw/unsolicited-data-policy.t.cpp
+++ b/tests/daemon/fw/unsolicited-data-policy.t.cpp
@@ -25,9 +25,11 @@
#include "fw/unsolicited-data-policy.hpp"
#include "fw/forwarder.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
#include "tests/test-common.hpp"
+#include "tests/daemon/global-io-fixture.hpp"
+#include "tests/daemon/face/dummy-face.hpp"
+
#include <boost/logic/tribool.hpp>
#include <boost/mpl/vector.hpp>
@@ -37,7 +39,7 @@
using namespace nfd::tests;
-class UnsolicitedDataPolicyFixture : public UnitTestTimeFixture
+class UnsolicitedDataPolicyFixture : public GlobalIoTimeFixture
{
protected:
UnsolicitedDataPolicyFixture()