Expand description
Testing helpers for diagprint.
diagprint-test provides focused assertions, canonical identity checks, and
deterministic snapshot helpers over structured diagnostics and diagnostic
reports without depending on rendered terminal output.
The helpers intentionally inspect diagprint’s public structured model rather than parsing presentation formats.
Modules§
- prelude
- Common imports for tests using
diagprint-test.
Macros§
- assert_
diagnostic_ file_ snapshot - Asserts that a diagnostic matches a JSON snapshot file.
- assert_
diagnostic_ snapshot - Asserts that a diagnostic matches an inline JSON snapshot.
- assert_
report_ file_ snapshot - Asserts that a diagnostic report matches a JSON snapshot file.
- assert_
report_ snapshot - Asserts that a diagnostic report matches an inline JSON snapshot.
Constants§
- SNAPSHOT_
IGNORED_ FIELDS - Runtime-specific diagnostic fields deliberately excluded from stable snapshots.
Traits§
- Diagnostic
Assertions - Assertion helpers for one
Diagnostic. - Diagnostic
Canonical Assertions - Canonical identity assertions for one
Diagnostic. - Diagnostic
Delta Assertions - Assertions over a semantic
DiagnosticDelta. - Diagnostic
Report Assertions - Assertion helpers for
DiagnosticReport. - Diagnostic
Report Canonical Assertions - Canonical digest assertions for
DiagnosticReport.
Functions§
- assert_
diagnostic_ matches_ snapshot - Compares one diagnostic against an expected JSON snapshot.
- assert_
report_ matches_ snapshot - Compares one report against an expected JSON snapshot.
- diagnostic_
snapshot - Produces stable, pretty-printed JSON for one diagnostic.
- report_
snapshot - Produces stable, pretty-printed JSON for a diagnostic report.