Skip to main content

decimal_scaled_golden/
lib.rs

1// SPDX-FileCopyrightText: 2026 John Moxley
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! `decimal-scaled-golden` — the golden values + validation/reporting harness.
5//! Library-agnostic: a library implements `subject::DecimalSubject` (one per
6//! `(width, scale)` cell) to be validated/benched against the singular golden
7//! values. No subject impls live in this crate.
8//!
9//! One folder per extension point — `subject`, `loader`, `execution`, `runner`,
10//! `validators`, `reporting` — with shared leaf types (`function`, `rounding`,
11//! `outcome`, `string_decimal`, `collector`) gathered under `support`.
12
13pub mod execution;
14pub mod loader;
15pub mod reporting;
16pub mod runner;
17pub mod subject;
18pub mod support;
19pub mod validators;
20
21// Crate-root aliases for the shared leaves, so `crate::function`, `crate::collector`,
22// etc. resolve regardless of where the type lives.
23pub use support::{collector, function, outcome, rounding, string_decimal};
24
25pub use collector::{
26    CellStatus, ExecutionCollector, ExecutionResult, FunctionCollector, RunCollector,
27    SubjectCollector,
28};
29pub use execution::{ExecutionStrategy, RunOnce, Timed};
30#[cfg(feature = "bench")]
31pub use execution::CriterionStrategy;
32pub use function::Function;
33pub use loader::{CaseLoader, FileLoader, FilterLoader, GoldenCase, GoldenValue};
34#[cfg(feature = "net")]
35pub use loader::{UrlLoader, DEFAULT_REF};
36pub use outcome::Outcome;
37pub use reporting::{
38    ConsoleReporter, InlineReporter, ReportArtifact, ReportOutput, Reporter, RunSummary, TsvReporter,
39};
40pub use rounding::RoundingMode;
41pub use runner::{GoldenRunner, ParallelRunner, SequentialRunner};
42pub use subject::{
43    Capabilities, Computed, DecimalSubject, FnSupport, Limits, NonReal, Overflow, Radix,
44};
45pub use validators::{
46    OverflowValidator, PrecisionValidator, RoundingValidator, ValidationContext, Validator,
47};