core: move nfd-specific files to daemon/
Refs: #4922
Change-Id: I2243dbb87c63f9cbaf7d7051d7a0d4bca2f9fdb5
diff --git a/tests/core/config-file.t.cpp b/tests/daemon/common/config-file.t.cpp
similarity index 94%
rename from tests/core/config-file.t.cpp
rename to tests/daemon/common/config-file.t.cpp
index 05b2722..8eae4fb 100644
--- a/tests/core/config-file.t.cpp
+++ b/tests/daemon/common/config-file.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include "tests/test-common.hpp"
@@ -146,7 +146,7 @@
ConfigFile file;
DummyAllSubscriber sub(file);
- std::ifstream input("tests/core/config_example.info");
+ std::ifstream input("tests/daemon/common/config_example.info");
BOOST_REQUIRE(input.is_open());
file.parse(input, false, "config_example.info");
@@ -169,10 +169,10 @@
ConfigFile file;
DummyAllSubscriber sub(file, true);
- std::ifstream input("tests/core/config_example.info");
+ std::ifstream input("tests/daemon/common/config_example.info");
BOOST_REQUIRE(input.is_open());
- file.parse(input, true, "tests/core/config_example.info");
+ file.parse(input, true, "tests/daemon/common/config_example.info");
BOOST_CHECK(sub.allCallbacksFired());
}
@@ -240,7 +240,7 @@
ConfigFile file;
DummyAllSubscriber sub(file);
- file.parse("tests/core/config_example.info", false);
+ file.parse("tests/daemon/common/config_example.info", false);
BOOST_CHECK(sub.allCallbacksFired());
}
@@ -258,7 +258,7 @@
ConfigFile file;
DummyAllSubscriber sub(file);
- BOOST_CHECK_THROW(file.parse("tests/core/config_malformed.info", false), ConfigFile::Error);
+ BOOST_CHECK_THROW(file.parse("tests/daemon/common/config_malformed.info", false), ConfigFile::Error);
BOOST_CHECK(sub.noCallbacksFired());
}
@@ -267,7 +267,7 @@
ConfigFile file;
DummyAllSubscriber sub(file, true);
- file.parse("tests/core/config_example.info", true);
+ file.parse("tests/daemon/common/config_example.info", true);
BOOST_CHECK(sub.allCallbacksFired());
}
diff --git a/tests/core/config_example.info b/tests/daemon/common/config_example.info
similarity index 100%
rename from tests/core/config_example.info
rename to tests/daemon/common/config_example.info
diff --git a/tests/core/config_malformed.info b/tests/daemon/common/config_malformed.info
similarity index 100%
rename from tests/core/config_malformed.info
rename to tests/daemon/common/config_malformed.info
diff --git a/tests/core/counter.t.cpp b/tests/daemon/common/counter.t.cpp
similarity index 98%
rename from tests/core/counter.t.cpp
rename to tests/daemon/common/counter.t.cpp
index 387b13f..60de483 100644
--- a/tests/core/counter.t.cpp
+++ b/tests/daemon/common/counter.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/counter.hpp"
+#include "common/counter.hpp"
#include "tests/test-common.hpp"
diff --git a/tests/daemon/global.t.cpp b/tests/daemon/common/global.t.cpp
similarity index 99%
rename from tests/daemon/global.t.cpp
rename to tests/daemon/common/global.t.cpp
index bb24218..dced382 100644
--- a/tests/daemon/global.t.cpp
+++ b/tests/daemon/common/global.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/core/privilege-helper.t.cpp b/tests/daemon/common/privilege-helper.t.cpp
similarity index 98%
rename from tests/core/privilege-helper.t.cpp
rename to tests/daemon/common/privilege-helper.t.cpp
index 58f8947..dcea7cb 100644
--- a/tests/core/privilege-helper.t.cpp
+++ b/tests/daemon/common/privilege-helper.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/privilege-helper.hpp"
+#include "common/privilege-helper.hpp"
#include "tests/test-common.hpp"
diff --git a/tests/daemon/face/multicast-ethernet-transport.t.cpp b/tests/daemon/face/multicast-ethernet-transport.t.cpp
index db248ac..4961a69 100644
--- a/tests/daemon/face/multicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/multicast-ethernet-transport.t.cpp
@@ -27,7 +27,7 @@
#include "ethernet-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/tests/core/network-predicate.t.cpp b/tests/daemon/face/network-predicate.t.cpp
similarity index 98%
rename from tests/core/network-predicate.t.cpp
rename to tests/daemon/face/network-predicate.t.cpp
index 378b6aa..73e29c6 100644
--- a/tests/core/network-predicate.t.cpp
+++ b/tests/daemon/face/network-predicate.t.cpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/network-predicate.hpp"
-#include "core/config-file.hpp"
+#include "face/network-predicate.hpp"
+#include "common/config-file.hpp"
#include "tests/test-common.hpp"
@@ -35,8 +35,10 @@
#include <sstream>
namespace nfd {
+namespace face {
namespace tests {
+BOOST_AUTO_TEST_SUITE(Face)
BOOST_AUTO_TEST_SUITE(TestNetworkPredicate)
template<class T>
@@ -508,6 +510,8 @@
BOOST_AUTO_TEST_SUITE_END() // IpAddress
BOOST_AUTO_TEST_SUITE_END() // TestNetworkPredicate
+BOOST_AUTO_TEST_SUITE_END() // Face
} // namespace tests
+} // namespace face
} // namespace nfd
diff --git a/tests/daemon/face/tcp-channel-fixture.hpp b/tests/daemon/face/tcp-channel-fixture.hpp
index fa90735..b872f94 100644
--- a/tests/daemon/face/tcp-channel-fixture.hpp
+++ b/tests/daemon/face/tcp-channel-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, 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,
@@ -27,7 +27,7 @@
#define NFD_TESTS_DAEMON_FACE_TCP_CHANNEL_FIXTURE_HPP
#include "face/tcp-channel.hpp"
-#include "core/network-predicate.hpp"
+#include "face/network-predicate.hpp"
#include "channel-fixture.hpp"
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index a19623f..d97ce47 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -24,7 +24,7 @@
*/
#include "test-netif.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/tests/daemon/fw/asf-measurements.t.cpp b/tests/daemon/fw/asf-measurements.t.cpp
index d08f761..a6d8c02 100644
--- a/tests/daemon/fw/asf-measurements.t.cpp
+++ b/tests/daemon/fw/asf-measurements.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/asf-measurements.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 5776f6c..e63951c 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/best-route-strategy2.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/face/dummy-face.hpp"
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 59b5ef3..598935c 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/forwarder.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index e1c4027..a44ba78 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/multicast-strategy.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/face/dummy-face.hpp"
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 50d3de5..5c63f61 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -25,7 +25,7 @@
#include "topology-tester.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "face/generic-link-service.hpp"
#include <ndn-cxx/encoding/encoding-buffer-fwd.hpp>
diff --git a/tests/daemon/global-io-fixture.cpp b/tests/daemon/global-io-fixture.cpp
index 4888e80..9d9b184 100644
--- a/tests/daemon/global-io-fixture.cpp
+++ b/tests/daemon/global-io-fixture.cpp
@@ -24,7 +24,7 @@
*/
#include "tests/daemon/global-io-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace tests {
diff --git a/tests/daemon/limited-io.cpp b/tests/daemon/limited-io.cpp
index c54a290..aeb1ea7 100644
--- a/tests/daemon/limited-io.cpp
+++ b/tests/daemon/limited-io.cpp
@@ -25,7 +25,7 @@
#include "tests/daemon/limited-io.hpp"
#include "tests/test-common.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include <boost/exception/diagnostic_information.hpp>
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.cpp b/tests/daemon/mgmt/face-manager-command-fixture.cpp
index 16e99c6..ed90d0a 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.cpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.cpp
@@ -24,7 +24,7 @@
*/
#include "face-manager-command-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include <ndn-cxx/net/network-monitor-stub.hpp>
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 5d61168..0918aaf 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -172,7 +172,7 @@
BOOST_AUTO_TEST_CASE(NameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= Fib::getMaxDepth()) {
prefix.append("A");
}
diff --git a/tests/daemon/mgmt/general-config-section.t.cpp b/tests/daemon/mgmt/general-config-section.t.cpp
index 1f7188a..5dbfc41 100644
--- a/tests/daemon/mgmt/general-config-section.t.cpp
+++ b/tests/daemon/mgmt/general-config-section.t.cpp
@@ -24,8 +24,8 @@
*/
#include "mgmt/general-config-section.hpp"
-#include "core/config-file.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/config-file.hpp"
+#include "common/privilege-helper.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index 04d9dca..dd34b5e 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -24,7 +24,6 @@
*/
#include "mgmt/rib-manager.hpp"
-#include "core/fib-max-depth.hpp"
#include "rib/fib-updater.hpp"
#include "manager-common-fixture.hpp"
@@ -405,7 +404,7 @@
BOOST_AUTO_TEST_CASE(NameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= Fib::getMaxDepth()) {
prefix.append("A");
}
auto params = makeRegisterParameters(prefix, 2899);
@@ -413,9 +412,9 @@
receiveInterest(command);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, command.getName(), ControlResponse(414,
- "Route prefix cannot exceed " + ndn::to_string(FIB_MAX_DEPTH) +
- " components")),
+ BOOST_CHECK_EQUAL(checkResponse(0, command.getName(),
+ ControlResponse(414, "Route prefix cannot exceed " +
+ to_string(Fib::getMaxDepth()) + " components")),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(m_commands.size(), 0);
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 6b7e390..ae96352 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -124,7 +124,7 @@
BOOST_AUTO_TEST_CASE(SetNameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= NameTree::getMaxDepth()) {
prefix.append("A");
}
ControlParameters reqParams;
diff --git a/tests/daemon/rib-io-fixture.cpp b/tests/daemon/rib-io-fixture.cpp
index 768c5cc..a0c8048 100644
--- a/tests/daemon/rib-io-fixture.cpp
+++ b/tests/daemon/rib-io-fixture.cpp
@@ -25,7 +25,7 @@
#include "tests/daemon/rib-io-fixture.hpp"
#include "tests/test-common.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include <boost/exception/diagnostic_information.hpp>
diff --git a/tests/daemon/rib/service.t.cpp b/tests/daemon/rib/service.t.cpp
index e732e07..80b0c38 100644
--- a/tests/daemon/rib/service.t.cpp
+++ b/tests/daemon/rib/service.t.cpp
@@ -24,7 +24,7 @@
*/
#include "rib/service.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/rib-io-fixture.hpp"
diff --git a/tests/daemon/table/dead-nonce-list.t.cpp b/tests/daemon/table/dead-nonce-list.t.cpp
index 1cd32eb..b98cd00 100644
--- a/tests/daemon/table/dead-nonce-list.t.cpp
+++ b/tests/daemon/table/dead-nonce-list.t.cpp
@@ -24,7 +24,7 @@
*/
#include "table/dead-nonce-list.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index cdda120..1b86cd5 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "face/face.hpp"
#include "face/tcp-channel.hpp"
#include "face/udp-channel.hpp"