summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-06-28 15:57:03 +0900
committerSho Amano <samano@xevo.com>2018-06-28 16:01:08 +0900
commitec56a0847b8c73050820c8893bcc3fa1f7642388 (patch)
treee1c3be8fe992afb8219926b27a06049bcecf80d1
parenta0c751be3247b10d769104a6691490176acc8034 (diff)
downloadsdl_core-ec56a0847b8c73050820c8893bcc3fa1f7642388.tar.gz
fix: protocol_handler_test not running any tests
I tried to include transport_adapter_impl.cc using list(APPEND ...). However once I included the file in SOURCES, create_test() created an empty test executable. I am not sure why this happens.
-rw-r--r--src/components/protocol_handler/test/CMakeLists.txt4
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/components/protocol_handler/test/CMakeLists.txt b/src/components/protocol_handler/test/CMakeLists.txt
index e3e5961c15..ca079dcc7e 100644
--- a/src/components/protocol_handler/test/CMakeLists.txt
+++ b/src/components/protocol_handler/test/CMakeLists.txt
@@ -43,10 +43,6 @@ include_directories (
collect_sources(SOURCES ${CMAKE_CURRENT_SOURCE_DIR})
-file(GLOB SOURCES
- ${COMPONENTS_DIR}/transport_manager/transport_adapter/transport_adapter_impl.cc
-)
-
set(LIBRARIES
gmock
ProtocolHandler
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
index 45f59d9e8d..634512a2d2 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -52,6 +52,15 @@
#include "utils/test_async_waiter.h"
#include <bson_object.h>
+namespace transport_manager {
+namespace transport_adapter {
+// taken from transport_adapter_impl.cc
+const char* tc_enabled = "enabled";
+const char* tc_tcp_port = "tcp_port";
+const char* tc_tcp_ip_address = "tcp_ip_address";
+}
+}
+
namespace test {
namespace components {
namespace protocol_handler_test {