sots-engine/tests/mars_stream/CMakeLists.txt
alex e62d974601 stream: DomainArchive, the value-axis companion to the coverage ratchet
Coverage is indexed by shape and answers 'does a field name this item'. Two
saves carrying content nobody had modelled scored 100% anyway, because the
novelty landed in fields that were already typed. This asks what the corpus has
ever actually put in each field.

Over 22 saves: 724 fields observed, 490 vary, 234 constant. A third of the
format we call 99.99% typed has been seen holding exactly one value.
2026-09-08 21:57:43 -04:00

33 lines
1.9 KiB
CMake

# mars/stream + mars/rng tests. test_save reads the owner's saves via SOTS_SAVES_DIR at run time
# and skips cleanly when it is unset (saves never enter the repo).
add_executable(mars_stream_test_rng test_rng.cpp)
target_link_libraries(mars_stream_test_rng PRIVATE mars_rng)
add_test(NAME mars_rng_unit COMMAND mars_stream_test_rng)
add_executable(mars_stream_test_stream test_stream.cpp)
target_link_libraries(mars_stream_test_stream PRIVATE mars_stream)
add_test(NAME mars_stream_unit COMMAND mars_stream_test_stream)
add_executable(mars_stream_test_save test_save.cpp)
target_link_libraries(mars_stream_test_save PRIVATE mars_stream mars_rng)
add_test(NAME mars_stream_save COMMAND mars_stream_test_save)
# The value-axis companion to test_save's coverage number: what the corpus has
# ever put in each typed field, and which fields it never exercised at all.
add_executable(mars_stream_test_domains test_domains.cpp)
target_link_libraries(mars_stream_test_domains PRIVATE mars_stream)
add_test(NAME mars_stream_domains COMMAND mars_stream_test_domains)
foreach(_t mars_stream_test_rng mars_stream_test_stream mars_stream_test_save mars_stream_test_domains)
target_include_directories(${_t} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_options(${_t} PRIVATE -Wall -Wextra -Wpedantic)
endforeach()
# Conformance of the typed shapes against the wire schema recovered from the game's
# serializers (include/generated/sots_stream_schema.h). No game data: the generated
# table plus shapes.h, so this one always runs.
add_executable(mars_stream_test_wire_schema test_wire_schema.cpp)
target_link_libraries(mars_stream_test_wire_schema PRIVATE mars_stream sots_addresses)
add_test(NAME mars_stream_wire_schema COMMAND mars_stream_test_wire_schema)
target_include_directories(mars_stream_test_wire_schema PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_options(mars_stream_test_wire_schema PRIVATE -Wall -Wextra -Wpedantic)