Cockatrice/tests
BruebachL 90bb3b8807 [Tests] Cover DeckFilterString parse-error reporting (#7402)
* [Tests] Cover DeckFilterString parse-error reporting

DeckFilterString had no tests, so nothing pinned its error contract. Add
coverage for the parse-error message, per-instance isolation, and the fact
that the permanent parser's logger keeps no state between instances.

The logger is reinstalled by each constructor and invoked only by the parse
that immediately follows, so the logger's capture is live whenever it runs.
These tests guard that arrangement rather than a fixed defect.

* [Tests] Link gtest_main on the fetched-gtest path

The downloaded-gtest branch set GTEST_BOTH_LIBRARIES to `gtest` alone, while
FindGTest sets it to both halves. Every test target links that list rather than
picking an entry point, so on this path nothing provides main() and any test
source that does not define its own fails at link with `undefined reference to
main` pointing at crt1.o, naming neither gtest nor the line responsible.

That stayed latent while every test carried its own four-line main(). A test that
omits it now fails, and the error points at the C runtime rather than at gtest,
which is a long way from the cause. Restoring both halves makes the two paths
agree and drops the boilerplate requirement on new test sources.

The 18 sources that still define main() keep linking: gtest_main.cc defines
nothing but main, so the linker leaves its object in the archive unused rather
than reporting a duplicate.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-10-10 19:53:26 +02:00
..
card_zone_algorithms [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
carddatabase [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
deck_list_model [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
deck_list_zones [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
loading_from_clipboard [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
movecard_tests [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
oracle [Build] Add an ENABLE_SANITIZERS option for ASan and UBSan 2026-10-10 19:51:07 +02:00
picture_loader_benchmark [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
settings [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
theme_migration [Tests] Register each test case with CTest instead of each test binary 2026-10-10 19:48:21 +02:00
card_update_progress_test.cpp [Client] Improve card database update visibility (#7458) 2026-10-09 11:07:48 +02:00
clamped_arithmetic_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
CMakeLists.txt [Tests] Cover DeckFilterString parse-error reporting (#7402) 2026-10-10 19:53:26 +02:00
deck_filter_string_test.cpp [Tests] Cover DeckFilterString parse-error reporting (#7402) 2026-10-10 19:53:26 +02:00
deck_hash_performance_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
expression_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
lag_monitor_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
latency_tracker_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
loader_local_matching_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
metrics_registry_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
password_hash_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
playmat_resolver_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
report_categories_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_card_counter_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_counter_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_developer_role_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_dump_zone_test.cpp [Tests] Format the zone dump helper and its tests to clang-format 2026-10-10 19:53:26 +02:00
server_game_join_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_rate_limiter_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
single_instance_manager_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
test_age_formatting.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
translation_loader_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
translation_loader_test.ts [Translations] Load Qt's own translations and build ours with the binary (#7384) 2026-10-03 15:04:30 +02:00
warning_categories_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00