This guide is mandatory for every test and benchmark. No external test framework, assertion macro or ad-hoc report format is allowed.
| Item | Location |
|---|---|
| Functional test | tests/test_<topic>.cpp |
| Benchmark | tests/benchmark_<topic>.cpp |
| Shared harness | tests/support/test_harness.hpp |
| Scenario generation | tests/support/engine_scenario.hpp |
| Metric invariant checks | tests/support/metric_checks.hpp |
| Suite specification | docs/testing/suites/<suite_name>.md |
| Generated reports | docs/testing/results/<suite_name>.md and .json |
| Status ledger | docs/testing/test_catalog.md |
<suite_name> is the snake_case identifier passed to TestSuite.
main builds a TestSuite with the suite identifier and a plain-text description of the verified invariants, groups work with section, and returns finish().check, check_near, check_relative, check_at_most and check_finite. assert, exceptions and abort are forbidden.measure records numbers worth keeping (timings, ratios, statistics); note records context.finish writes the markdown and json reports into the directory named by RELATIVISTIC_TEST_REPORT_DIR (./test_reports when unset) and returns 0 or 1.Testing::DeterministicRandom from engine_scenario.hpp with an explicit hexadecimal seed, or fixed data.max(1, |value|) for quantities that may be orders of magnitude below one.operator new only around the measured region, stores the results in plain scalars, and reports through the harness after the trap is released, because the harness itself allocates.verify_metric_geometry from tests/support/metric_checks.hpp for the inversion, symmetry, signature and connection invariants instead of re-implementing them.add_executable, link relativistic_core (plus imgui_lib for interface logic) and add add_test.--profile quick CTest entry and a custom target with USES_TERMINAL for the full matrix.RELATIVISTIC_TEST_REPORT_DIR is bound to docs/testing/results for every registered test.Every maintained test has a suite page with: executable, source, link to its generated result, purpose, covered metrics or modes, a table of checks with tolerances and their justification, scenario parameters, limits and acceptance criteria. Every suite page ends with a “Recorded results” section linking to docs/testing/results/<suite_name>.md and .json, and every check of the test must appear in the check table of its page with its tolerance and justification. A test without a suite page, a catalogue entry and committed results is not considered maintained. Commit the generated reports in the same commit as any change that alters a test or the behaviour it covers.