diff --git a/Unit testing/CMakeLists.txt b/Unit testing/CMakeLists.txt index e439d6b..1e65af5 100644 --- a/Unit testing/CMakeLists.txt +++ b/Unit testing/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.19 FATAL_ERROR) project(UnitTest CXX) -include(../external/catch2/contrib/Catch.cmake) +include(../external/catch2/extras/Catch.cmake) add_executable(UnitTest adummy.cpp characteristics_tests.cpp) @@ -17,7 +17,7 @@ target_include_directories(UnitTest PRIVATE ${CMAKE_SOURCE_DIR}/include) target_compile_definitions(UnitTest PRIVATE ${DEF_COMP}) target_compile_options(UnitTest PRIVATE ${COMPILE_FLAGS}) target_link_options(UnitTest PRIVATE ${LINKER_OPTIONS}) -target_link_libraries(UnitTest ${LINKER_FLAGS} Catch2 nlohmann_json::nlohmann_json) +target_link_libraries(UnitTest ${LINKER_FLAGS} Catch2::Catch2WithMain nlohmann_json::nlohmann_json) enable_testing() catch_discover_tests(UnitTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} REPORTER junit OUTPUT_DIR ${CMAKE_SOURCE_DIR} OUTPUT_PREFIX cppspec- OUTPUT_SUFFIX .xml) diff --git a/Unit testing/adummy.cpp b/Unit testing/adummy.cpp index 8a4847b..c4be9a8 100644 --- a/Unit testing/adummy.cpp +++ b/Unit testing/adummy.cpp @@ -1,3 +1,3 @@ #define CATCH_CONFIG_MAIN -#include \ No newline at end of file +#include \ No newline at end of file diff --git a/Unit testing/characteristics_tests.cpp b/Unit testing/characteristics_tests.cpp index fb5a14a..0cbc84e 100644 --- a/Unit testing/characteristics_tests.cpp +++ b/Unit testing/characteristics_tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include "characteristic/adresse.hpp" #include "characteristic/chance.hpp" #include "characteristic/endurance.hpp" diff --git a/external/catch2 b/external/catch2 index 216713a..05e10df 160000 --- a/external/catch2 +++ b/external/catch2 @@ -1 +1 @@ -Subproject commit 216713a4066b79d9803d374f261ccb30c0fb451f +Subproject commit 05e10dfccc28c7f973727c54f850237d07d5e10f