Files
Marino Rottier 45ff80d890 Refactor widget state to single storage model (#26443)
* Allow flag/bitmask coexistence in readers

* Add factory helpers and bulk setters for per-widget flags

* Switch coexistence from OR-both to per-window opt-in

* Migrate seven small windows to per-widget flags

* Migrate seven more windows to per-widget flags

* Migrate Cheats, MapGen and Footpath to per-widget flags

* Fix #26421: scenery tab highlight wraps when there are 64+ groups

* Migrate Ride window to per-widget flags

* Migrate ride and maze construction windows to per-widget flags

* Migrate six more windows to per-widget flags

* Migrate Banner, EditorScenarioOptions and RideList to per-widget flags

* Migrate SceneryScatter and LoadSave to per-widget flags

* Migrate EditorObjectSelection, GameBottomToolbar, Guest, Map, NewRide and Park to per-widget flags

* Migrate TopToolbar, TrackList, Research, Player and Options to per-widget flags

* Opt in remaining windows to per-widget flags

* Narrow getters and setters to per-widget flags

* Remove bitmask fields and useWidgetFlags switch

* Restore switch statements for tab/density pressed state

* Add makeHoldableSpinnerWidgets to drop per-page loops

* Update tests for per-widget flag storage

* Add changelog entry for #26421

* Reword narrative-tense comments from the migration

* Fix clang-format violations

* Remove dead holdable-widget tables from Park and Finances
2026-04-28 09:26:02 +02:00

52 lines
2.4 KiB
CMake

cmake_minimum_required(VERSION 3.20)
include(GoogleTest)
find_package(GTest REQUIRED)
file(CREATE_LINK "${CMAKE_CURRENT_LIST_DIR}/testdata" "${CMAKE_BINARY_DIR}/testdata" SYMBOLIC)
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/openrct2\" \"${CMAKE_BINARY_DIR}/data\")")
set(test_files
"${CMAKE_CURRENT_SOURCE_DIR}/AssertHelpers.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/BitSetTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/CircularBuffer.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/CLITests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/CryptTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Endianness.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/EnumMapTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/FormattingTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ImageImporterTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/IniReaderTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/IniWriterTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LanguagePackTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LocalisationTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/MultiLaunch.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Pathfinding.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Platform.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/PlayTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ReplayTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/RideRatings.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/EntityImportTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/S6ImportExportTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/SawyerCodingTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ScenarioPatcherTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ScriptingTests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/StringTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TestData.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TestData.h"
"${CMAKE_CURRENT_SOURCE_DIR}/tests.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TileElements.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TileElementsView.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/WidgetStateTests.cpp")
add_executable(OpenRCT2Tests ${test_files})
add_executable(OpenRCT2::OpenRCT2Tests ALIAS OpenRCT2Tests)
target_link_libraries(OpenRCT2Tests GTest::gtest GTest::gtest_main libopenrct2)
target_include_directories(OpenRCT2Tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
set_target_properties(OpenRCT2Tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
gtest_discover_tests(OpenRCT2Tests
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DISCOVERY_MODE PRE_TEST)