summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Network/CMakeLists.txt2
-rw-r--r--tests/Network/NameLookup.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/Network/CMakeLists.txt b/tests/Network/CMakeLists.txt
index 8bbe6294d..00d5e2f21 100644
--- a/tests/Network/CMakeLists.txt
+++ b/tests/Network/CMakeLists.txt
@@ -55,6 +55,8 @@ add_library(Network
${Network_HDRS}
)
+target_include_directories(Network SYSTEM PUBLIC ${CMAKE_SOURCE_DIR}/lib/asio/asio/include)
+
target_link_libraries(Network event_core event_extra fmt::fmt mbedtls)
if(NOT WIN32)
target_link_libraries(Network event_pthreads Threads::Threads)
diff --git a/tests/Network/NameLookup.cpp b/tests/Network/NameLookup.cpp
index 2904a0199..1ae6c3bbc 100644
--- a/tests/Network/NameLookup.cpp
+++ b/tests/Network/NameLookup.cpp
@@ -52,7 +52,7 @@ static void DoTest(void)
// Look up google.com (has multiple IP addresses):
LOGD("Network test: Looking up google.com");
- if (!cNetwork::HostnameToIP("google.com", std::make_shared<cFinishLookupCallbacks>(evtFinish)))
+ if (!cNetwork::HostnameToIP("google.com", std::make_unique<cFinishLookupCallbacks>(evtFinish)))
{
LOGWARNING("Cannot resolve google.com to IP");
abort();
@@ -63,7 +63,7 @@ static void DoTest(void)
// Look up 8.8.8.8 (Google free DNS):
LOGD("Network test: Looking up IP 8.8.8.8");
- if (!cNetwork::IPToHostName("8.8.8.8", std::make_shared<cFinishLookupCallbacks>(evtFinish)))
+ if (!cNetwork::IPToHostName("8.8.8.8", std::make_unique<cFinishLookupCallbacks>(evtFinish)))
{
LOGWARNING("Cannot resolve 8.8.8.8 to name");
abort();