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/table/name-tree.cpp b/tests/table/name-tree.cpp
index bc34c15..4411fd2 100644
--- a/tests/table/name-tree.cpp
+++ b/tests/table/name-tree.cpp
@@ -5,15 +5,17 @@
*/
#include "table/name-tree.hpp"
-#include <boost/test/unit_test.hpp>
+
+#include "tests/test-common.hpp"
namespace nfd {
+namespace tests {
using name_tree::Entry;
-BOOST_AUTO_TEST_SUITE(TableNameTree)
+BOOST_FIXTURE_TEST_SUITE(TableNameTree, BaseFixture)
-BOOST_AUTO_TEST_CASE (Entry)
+BOOST_AUTO_TEST_CASE(Entry)
{
Name prefix("ndn:/named-data/research/abc/def/ghi");
@@ -99,7 +101,7 @@
erasePitEntry(PitEntry2), false);
}
-BOOST_AUTO_TEST_CASE (NameTreeBasic)
+BOOST_AUTO_TEST_CASE(NameTreeBasic)
{
size_t nBuckets = 16;
NameTree nt(nBuckets);
@@ -266,6 +268,5 @@
BOOST_AUTO_TEST_SUITE_END()
+} // namespace tests
} // namespace nfd
-
-