game/sim/construction.{h,cpp}: Game::ShipRecords (four per-hull-class arrays plus the
per-design vector, sized by ENUMERATION against the wire, not by what the code touches)
and the completion bookkeeping BuildQueue::ProcessTurn performs -- the per-class built
counter, whose indexed increment has EXACTLY ONE writer in the whole image, and the
find-or-append per-design record keyed by the design's object id. RunSystemConstruction
wraps the point pass and keeps each completion's design id, which the point pass alone
does not report.
game/sim/colony: corrected from the instruction stream -- with points <= 0 the entry test
branches to the epilogue, so the REMOVAL SWEEP IS SKIPPED TOO. Carried as a labelled
hypothesis: no corpus save can reach the state that shows it.
app/construction_phase.{h,cpp}: S11's build-queue sub-pass, reported on its own line
because what blocks it is not what blocks the rest of the colony turn. It is blocked on
the per-system output term for points; it is NOT what the archived ship census waits on.
tests/game_sim/test_construction.cpp: 65 checks, including a corpus oracle the campaign
already owned and had not noticed -- zuul-turn16-noderoute -> zuul-turn17-rollpending is a
real consecutive-turn pair in which six orders complete and one is partially advanced.
The test SOLVES for the point total rather than assuming it, so a non-FIFO order, a
per-order budget or skip-instead-of-stop each falsify it.
13 lines
831 B
CMake
13 lines
831 B
CMake
# game/sim tests: four hand-computed suites + a real-save smoke test (skips unless SOTS_SAVES_JSON).
|
|
foreach(_t economy research colony movement techgraph visibility construction)
|
|
add_executable(game_sim_test_${_t} test_${_t}.cpp)
|
|
target_link_libraries(game_sim_test_${_t} PRIVATE sots_game_sim)
|
|
target_include_directories(game_sim_test_${_t} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_sim_test_${_t} PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_sim_${_t} COMMAND game_sim_test_${_t})
|
|
endforeach()
|
|
|
|
add_executable(game_sim_smoke_real_save smoke_real_save.cpp)
|
|
target_link_libraries(game_sim_smoke_real_save PRIVATE sots_game_sim)
|
|
target_include_directories(game_sim_smoke_real_save PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
add_test(NAME game_sim_smoke_real_save COMMAND game_sim_smoke_real_save)
|