UNit testing up to date for catch2

This commit is contained in:
Pcornat 2024-01-28 20:50:32 +01:00
parent 2755f4827e
commit 8dbf55d5d2
Signed by: Pcornat
GPG Key ID: E0326CC678A00BDD
4 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -1,3 +1,3 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

View File

@ -1,4 +1,4 @@
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include "characteristic/adresse.hpp"
#include "characteristic/chance.hpp"
#include "characteristic/endurance.hpp"

2
external/catch2 vendored

@ -1 +1 @@
Subproject commit 216713a4066b79d9803d374f261ccb30c0fb451f
Subproject commit 05e10dfccc28c7f973727c54f850237d07d5e10f