2023-01-27 17:04:39 +00:00
|
|
|
set(MODULE_NAME network)
|
|
|
|
|
|
|
|
list(APPEND UNIT_TEST_FILES
|
|
|
|
TestNetworkManagerServer.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(INTEGRATION_TEST_FILES)
|
|
|
|
if (WIN32)
|
|
|
|
list(APPEND INTEGRATION_TEST_FILES
|
|
|
|
TestWin32WebServer.cpp
|
|
|
|
TestWinsockClient.cpp
|
|
|
|
TestWinsockServer.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(UNIT_TEST_TARGET_NAME ${MODULE_NAME}_unit_tests)
|
|
|
|
set(INTEGRATION_TEST_TARGET_NAME ${MODULE_NAME}_integration_tests)
|
|
|
|
|
|
|
|
add_executable(${UNIT_TEST_TARGET_NAME} ${CMAKE_SOURCE_DIR}/test/test_runner.cpp ${UNIT_TEST_FILES})
|
|
|
|
target_link_libraries(${UNIT_TEST_TARGET_NAME} PUBLIC test_utils network)
|
|
|
|
set_property(TARGET ${UNIT_TEST_TARGET_NAME} PROPERTY FOLDER test/${MODULE_NAME})
|
|
|
|
|
|
|
|
add_executable(${INTEGRATION_TEST_TARGET_NAME} ${CMAKE_SOURCE_DIR}/test/test_runner.cpp ${INTEGRATION_TEST_FILES})
|
|
|
|
target_link_libraries(${INTEGRATION_TEST_TARGET_NAME} PUBLIC test_utils network)
|
|
|
|
set_property(TARGET ${INTEGRATION_TEST_TARGET_NAME} PROPERTY FOLDER test/${MODULE_NAME})
|