-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Context
Parent: #160
Five report types (TraceReport, ChainReport, CutReport, DiffReport, PackagesReport) each need the same set of tests: JSON field validation, terminal output format, empty-data handling, large-data handling. Writing these by hand is repetitive and error-prone — exactly the case RFR recommends macro-generated test batteries.
Expected Behavior
A test_battery! macro that generates a standard set of tests for each report type, reducing per-type boilerplate to one line.
Scope
test_battery!macro that takes a report type and a constructor closure- Generated tests per type:
to_json()produces valid JSONto_json()field names match expected setto_terminal()produces non-empty outputto_terminal()withcolor: falseproduces no ANSI codes- Empty data (zero modules/packages) doesn't panic
- Round-trip:
to_json()contains all data from the struct
- Add one invocation per report type
Reactions are currently unavailable