Tests¶
pixi run test-cpp # C++ unit tests: the pure logic behind the new features
pixi run test-rust # the Rust text library
pixi run test-py # the Python tools, the installer and the Python text module
pixi run test-build # checks on the built game
pixi run lint # clippy, warnings are errors
pixi run test # C++, Rust and Python together
C++¶
New logic lives in small headers under Game/src/game and HPL2/core/include that take plain
values, not engine objects: comfort profiles and their maths, presets, guidance, autosave timing,
gamepad layouts and look curves, the story skip, loading progress, preload lists, word wrap,
text decoding. Each has a test file in tests/cpp (test_comfort.cpp, test_presets.cpp,
test_autosave.cpp and so on), run by CTest. They need no game data and finish in seconds.
Some tests reach further:
test_cjk_ffi.cppcalls the Rust library through its C interface.test_script_calls.cppdrives the real AngelScript engine with game-shaped function signatures (many floats, integers past the registers, strings by reference and by value, virtual methods), which guards the native calling code on each platform.test_fbx_decompose.cppandtest_fbx_anim_times.cppcover the ufbx animation reader.
Rust¶
cargo test covers decoding edge cases, the line-breaking rules, the C interface and its
generated header, and parity with the Traditional Chinese tooling.
Python¶
tests/python tests the installer (against a replica game folder), the dev runner and tour
parser, the documentation shot list, and the Python text module. test_parity.py checks that
the module gives byte-identical results to the translation tooling.
In the game¶
Some things can only be seen in the running game: use the dev runner and its tours, which play the same steps every time and leave screenshots and camera traces to compare.