|
|
|
|
@ -297,6 +297,14 @@ SCENARIO tests group related assertions under SECTION sub-tests. Each SECTION is
|
|
|
|
|
|
|
|
|
|
In `--list-tests` output, SCENARIO tests display with "Scenario: " prefix. When filtering by name, wildcards handle the prefix transparently. |
|
|
|
|
|
|
|
|
|
#### SCENARIO/SECTION Patterns |
|
|
|
|
- Setup between SCENARIO and SECTIONs = fixture (runs once per SECTION) |
|
|
|
|
- Use lambdas that capture the fixture to eliminate repeated setup |
|
|
|
|
- Reuse structs in-place (mutate fields) rather than recreating |
|
|
|
|
- Single-line sections are valid: `SECTION("name") { helper(arg); }` |
|
|
|
|
- One SECTION per test is fine — SCENARIO provides grouping + fixture scope |
|
|
|
|
- `using Catch::Matchers::WithinAbs;` after all includes |
|
|
|
|
|
|
|
|
|
Use `WithinAbs(expected, tolerance)` for floating-point comparisons (NOT `Approx()`). |
|
|
|
|
|
|
|
|
|
## Hybrid Documentation Strategy |
|
|
|
|
|