Expand description
decimal-scaled-golden — the golden values + validation/reporting harness.
Library-agnostic: a library implements subject::DecimalSubject (one per
(width, scale) cell) to be validated/benched against the singular golden
values. No subject impls live in this crate.
One folder per extension point — subject, loader, execution, runner,
validators, reporting — with shared leaf types (function, rounding,
outcome, string_decimal, collector) gathered under support.
Re-exports§
pub use support::collector;pub use support::function;pub use support::outcome;pub use support::rounding;pub use support::string_decimal;pub use collector::CellStatus;pub use collector::ExecutionCollector;pub use collector::ExecutionResult;pub use collector::FunctionCollector;pub use collector::RunCollector;pub use collector::SubjectCollector;pub use execution::ExecutionStrategy;pub use execution::RunOnce;pub use execution::Timed;pub use function::Function;pub use loader::CaseLoader;pub use loader::FileLoader;pub use loader::FilterLoader;pub use loader::GoldenCase;pub use loader::GoldenValue;pub use outcome::Outcome;pub use reporting::ConsoleReporter;pub use reporting::InlineReporter;pub use reporting::ReportArtifact;pub use reporting::ReportOutput;pub use reporting::Reporter;pub use reporting::RunSummary;pub use reporting::TsvReporter;pub use rounding::RoundingMode;pub use runner::GoldenRunner;pub use runner::ParallelRunner;pub use runner::SequentialRunner;pub use subject::Capabilities;pub use subject::Computed;pub use subject::DecimalSubject;pub use subject::FnSupport;pub use subject::Limits;pub use subject::NonReal;pub use subject::Overflow;pub use subject::Radix;pub use validators::OverflowValidator;pub use validators::PrecisionValidator;pub use validators::RoundingValidator;pub use validators::ValidationContext;pub use validators::Validator;
Modules§
- execution
- Execution strategies — HOW one input-set is run: once, or repeated for timing.
Generic over
DecimalSubject, so the strategy is the typed→string boundary (Valuenever escapes it). - loader
- Loading golden cases + the golden value type.
CaseLoaderyields a function’sGoldenCases and declares the oracle’s reach;FileLoaderreads + parses files (parsing is its private detail);GoldenValueis the parsed golden number. - reporting
- Reporting. A
Reporterconsumes finished runs and renders named file outputs (IO at the edge);TsvReporteremits the flattened per-cell TSV. AnInlineReporterinstead streams a human-readable summary straight to a writer — the live console feedback a gate or shootout prints after validation;ConsoleReporteris the terminal impl. - runner
- The runner: drives a subject over the golden cases.
GoldenRunneris the trait;SequentialRunner/ParallelRunnerdiffer only in scheduling. The shared per-cell work (run_cell, the input filter) lives here. - subject
- The library-facing surface: the
DecimalSubjecttrait a decimal library implements to be tested, plus the value types the runner reasons about (Capabilities,Limits,Computed). No subject impls live in this crate. - support
- Shared leaf types used across the extension-point folders: the function
enumeration, rounding mode, the
Outcomeverdict, thestring_decimalcomparison helper, and the runcollectorrecords. These carry no extension seam of their own — they are the vocabulary the seams speak in. - validators
- Validation. One pure
Validatortrait — context in,Option<Outcome>out; the runner collects the verdicts. Validators only ever see the subject’s output as an erasedComputed<String>;Valuenever reaches them. The three have DISJOINT domains and self-gate.