This commit is contained in:
tooomm 2026-09-13 13:23:03 +02:00
parent fd82b140a8
commit 4ba06597f9
23 changed files with 57 additions and 14 deletions

View file

@ -1,3 +1,5 @@
# CMakeLists for "tests" directory
# NOTE: Qt modules for tests are defined centrally in cmake/FindQtRuntime.cmake (the _TEST_NEEDED variable).
# If a new test needs additional Qt modules, add them there — not in individual test CMakeLists.txt files.
enable_testing()
@ -20,8 +22,6 @@ add_test(NAME metrics_registry_test COMMAND metrics_registry_test)
add_test(NAME deck_hash_performance_test COMMAND deck_hash_performance_test)
set_tests_properties(deck_hash_performance_test PROPERTIES TIMEOUT 15)
# Find GTest
add_executable(dummy_test dummy_test.cpp)
add_executable(expression_test expression_test.cpp)
add_executable(clamped_arithmetic_test clamped_arithmetic_test.cpp)
@ -39,6 +39,7 @@ target_include_directories(lag_monitor_test PRIVATE ${CMAKE_SOURCE_DIR}/cockatri
add_executable(latency_tracker_test latency_tracker_test.cpp)
add_executable(metrics_registry_test ../servatrice/src/metrics_registry.cpp metrics_registry_test.cpp)
# Find GTest
find_package(GTest)
if(NOT GTEST_FOUND)

View file

@ -1,3 +1,5 @@
# CMakeLists for "card_zone_algorithms" directory
add_executable(card_zone_algorithms_test card_zone_algorithms_test.cpp)
target_include_directories(card_zone_algorithms_test PRIVATE ${CMAKE_SOURCE_DIR}/cockatrice/src/game/zones)

View file

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16)
# CMakeLists for "carddatabase" directory
project(CardDatabaseTests VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
# ------------------------

View file

@ -1,3 +1,5 @@
# CMakeLists for "deck_list_model" directory
add_executable(deck_list_model_custom_zones_test ${VERSION_STRING_CPP} deck_list_model_custom_zones_test.cpp)
if(NOT GTEST_FOUND)

View file

@ -1,3 +1,5 @@
# CMakeLists for "deck_list_zones" directory
add_executable(deck_list_zones_test deck_list_zones_test.cpp)
if(NOT GTEST_FOUND)

View file

@ -1,3 +1,5 @@
# CMakeLists for "loading_from_clipboard" directory
add_definitions("-DCARDDB_DATADIR=\"${CMAKE_CURRENT_SOURCE_DIR}/data/\"")
add_executable(loading_from_clipboard_test ${VERSION_STRING_CPP} clipboard_testing.cpp loading_from_clipboard_test.cpp)

View file

@ -1,3 +1,5 @@
# CMakeLists for "movecard_tests" directory
add_executable(reverse_card_move_test reverse_card_move_test.cpp)
if(NOT GTEST_FOUND)

View file

@ -1,3 +1,5 @@
# CMakeLists for "oracle" directory
add_executable(parse_cipt_test ../../oracle/src/parsehelpers.cpp parse_cipt_test.cpp)
if(NOT GTEST_FOUND)

View file

@ -1,3 +1,5 @@
# CMakeLists for "settings" directory
add_executable(settings_manager_test settings_manager_test.cpp)
add_executable(settings_defaults_test settings_defaults_test.cpp)
add_executable(settings_migration_test settings_migration_test.cpp)