tests: resetGlobalIoService for every test
All tests must use BaseFixture or a fixture derived from it to get this feature.
This commit also fixes a few warnings in tests/mgmt, and moves test cases into nfd::tests namespace.
refs #1290
Change-Id: I891441a5abce170e35648d463f7157b18429f79f
diff --git a/tests/fw/broadcast-strategy.cpp b/tests/fw/broadcast-strategy.cpp
index 26d0687..b256432 100644
--- a/tests/fw/broadcast-strategy.cpp
+++ b/tests/fw/broadcast-strategy.cpp
@@ -6,17 +6,17 @@
#include "fw/broadcast-strategy.hpp"
#include "strategy-tester.hpp"
-#include "../face/dummy-face.hpp"
+#include "tests/face/dummy-face.hpp"
-#include <boost/test/unit_test.hpp>
+#include "tests/test-common.hpp"
namespace nfd {
+namespace tests {
-BOOST_AUTO_TEST_SUITE(FwBroadcastStrategy)
+BOOST_FIXTURE_TEST_SUITE(FwBroadcastStrategy, BaseFixture)
BOOST_AUTO_TEST_CASE(ForwardTwo)
{
- resetGlobalIoService();
Forwarder forwarder;
typedef StrategyTester<fw::BroadcastStrategy> BroadcastStrategyTester;
BroadcastStrategyTester strategy(forwarder);
@@ -60,7 +60,6 @@
BOOST_AUTO_TEST_CASE(Reject)
{
- resetGlobalIoService();
Forwarder forwarder;
typedef StrategyTester<fw::BroadcastStrategy> BroadcastStrategyTester;
BroadcastStrategyTester strategy(forwarder);
@@ -85,4 +84,5 @@
BOOST_AUTO_TEST_SUITE_END()
+} // namespace tests
} // namespace nfd