- One `SCENARIO("description")` per logical test group, with `[tag1][tag2]` annotations
- Shared fixture: all constants, structs, and variables declared between `SCENARIO` opening and first `SECTION`
- Run `scripts/precalc_*.py` to generate expected values — these Python scripts are the authoritative source, providing an independent check against the C++ simulation. Embed the values directly in `WithinAbs()` calls (no need to declare named constants unless the value is reused).
- Embed expected values directly in `WithinAbs()` calls (see Section 4 for precalc script usage). No need to declare named constants unless the value is reused.
### 2. Duplication Elimination
- Use lambdas that capture the fixture for repeated setup→call→assert patterns
@ -24,7 +24,7 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l
- `INFO("label: " << value)` for debugging context
@ -53,9 +51,9 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l
## Refactoring Procedure
### Step 1: Refactor
- Verify the test file has a TOML config in `old_tests/`. If it doesn't, skip the TOML rewrite step — the test is likely hardcoded.
- Verify the test file has a TOML config in `old_tests/`. If it doesn't, the test is likely hardcoded — still refactor the C++ code but skip the TOML rewrite step.
- Check if the test is already in `tests/` (already refactored). Skip if so.
- Check the capability matrix in Section 5 — if the test needs SOI, maneuvers, rendezvous, etc., flag this before starting.
- Check the capability matrix in the Tooling &Sim Engine Capabilities section — if the test needs SOI, maneuvers, rendezvous, etc., flag this before starting.
- Process **one test file at a time**.
- Create `scripts/precalc_<test_name>.py` and run it to get expected values.
- Copy from `old_tests/` to `tests/`, rewrite using the pattern from `test_true_anomaly_roundtrip.cpp`.