From ed786b3217902567f5e6eb2e64a2a7092859470d Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Tue, 5 May 2026 09:40:42 -0400 Subject: [PATCH] docs: clarify SCENARIO grouping for shared setup/teardown in refactoring rules --- continue.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/continue.md b/continue.md index 6ef269c..5e26552 100644 --- a/continue.md +++ b/continue.md @@ -4,7 +4,8 @@ ### 1. Structure - 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` +- **Use SCENARIO to share setup/teardown across multiple SECTIONs.** Catch2 re-initializes the fixture before each SECTION, so declare shared constants, structs, and variables in the SCENARIO body (between the opening `{` and the first `SECTION`). These persist across all SECTIONs within the SCENARIO. +- Example: a `SimulationState* sim` created once in the SCENARIO body, then each SECTION mutates and tests it independently. - 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 @@ -121,12 +122,21 @@ All constants defined in `src/test_utilities.h` — use those, do not redefine l - `test_extreme_orientation_mixed` ✅ — Extreme orientation conversions, rotation matrix properties, singularity handling - `test_extreme_timescales` ✅ — 9 TEST_CASEs → 1 SCENARIO with 11 SECTIONs, all WithinAbs use named constants - `test_analytical_propagation` ✅ — 5 SCENARIOs → 1 SCENARIO with 23 SECTIONs, precalculated values, all WithinAbs use named constants +- `test_moon_orbits` ✅ — Multi-body hierarchical propagation with local/global coordinate tracking +- `test_energy` ✅ — Energy calculations and conservation tests +- `test_inclined_orbits` ✅ — 3D inclined orbit conversions, Molniya orbits, rotation matrices +- `test_maneuvers` ✅ — Impulsive burn tests with precalculated values +- `test_orbital_period` ✅ — Orbital period calculations, SCENARIO/SECTION pattern +- `test_true_anomaly_roundtrip` ✅ — True anomaly conversion round-trips, tight tolerances ### Can Refactor Now (sim_engine.py supports all features needed) -- `test_moon_orbits` — multi-body propagation - `test_periapsis_burn` — prograde burns - `test_hybrid_burns` — impulse burns - `test_omega_debug` — burn + element reconstruction +- `test_orbit_rendering` — rendering tests (check if sim_engine needed) +- `test_precision_boundaries` — boundary condition tests +- `test_invalid_parent_assignment` — validation/error handling tests +- `test_newton_raphson_convergence` — numerical convergence tests ### Blocked on Missing Features - `test_soi_transition` — needs SOI transitions