Descriptor + pure adapter + host tests for the per-player turn driver. Not deployed; the WIN32 half is unbuilt here (no cross-compiler on this host). The declared boundary is narrower than the function on purpose. Phases 2, 3 and 6 -- the savings apply, the aid records and the research refund -- are pure functions of ComputeBudget's 22 slots and ProcessResearch's overBudget, and both live in the original's own stack frame. Reaching them would mean calling ComputeBudget ourselves (it repairs ships in orbit, audit #6), reading the nested B1/B3 hooks (audit #5, the self-fulfilling compare), or inferring them from the Sav delta. So they are guarded, not checked, and the three formulas are written and unit-tested but not wired into the verdict. Declared: the phase-7 clear, the RebAI decay, the descending timed-bonus sweep, plus roll_flags and rng as observations ours never writes. Guards over the whole ServerPlayer and the TechTree header. docs/T-turn-driver.md states, before any run: which regions must not diverge, which checks are weak by construction on the reference save, what falsifies the ResearchRollPending reading, and the save that would finally fire the branch nobody has seen. host ctest 36/36 (was 35/35); clean_room_check OK.
6 lines
500 B
CMake
6 lines
500 B
CMake
# Lane T: the per-player turn-driver adapter (ServerPlayer snapshot -> the driver's own writes).
|
|
add_executable(shim_player_turn_unit_tests unit_tests.cpp)
|
|
target_link_libraries(shim_player_turn_unit_tests PRIVATE shim_player_turn sots_game_sim)
|
|
target_include_directories(shim_player_turn_unit_tests PRIVATE ${CMAKE_SOURCE_DIR}/tests/game_sim)
|
|
target_compile_options(shim_player_turn_unit_tests PRIVATE -Wall -Wextra -Werror)
|
|
add_test(NAME shim_player_turn_unit COMMAND shim_player_turn_unit_tests)
|