You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libsimlin: silent fixture-skip guards can turn integration tests into no-op passes #897
Several libsimlin integration tests guard fixture loading with a silent-skip pattern:
if !path.exists(){eprintln!("missing ... fixture; skipping");return;}
This pattern already caused real damage: in src/libsimlin/tests/integration/simulation.rs the guard pointed at a nonexistent path (../../src/engine/testdata/SIR_project.pb) for a long time, so test_interactive_set_get and test_set_value_phases silently passed while exercising nothing -- test_set_value_phases was still asserting a NotSimulatable error contract that had been obsolete for months. Those two were fixed on the conveyor-engine branch (path corrected to testdata/SIR_project.pb, guards replaced with hard .expect(...) failures), but the same landmine remains at:
All of these fixtures currently exist, so the tests run today -- but a moved or renamed fixture silently converts each test into a no-op pass, exactly the failure mode that hid the stale test_set_value_phases assertion.
Why it matters
Silently-skipped tests are worse than missing tests: they report green while verifying nothing, and let obsolete behavioral contracts linger unnoticed. The same class of bug was previously hit in the engine (#623).
Suggested fix
All fixtures are committed to the repo, so there is no legitimate "fixture may be absent" case. Replace each guard with a hard failure, e.g. std::fs::read(&path).expect("fixture must exist: ..."), matching the fixed tests in simulation.rs.
Context
Identified while fixing the stale test_set_value_phases test on the conveyor-engine branch (PR #869 follow-up work).
Activity
libsimlin: validate set_value_by_offset and fix the never-running pha…
libsimlin: validate set_value_by_offset and fix the never-running pha…