Docs/Evidence
Test Coverage
On this page 1 sections
Live counts as of 2026-10-08 (rg -c '^\s*#\[test\]' over crates/*/src and crates/*/tests; docs/planning/FEATURE_PARITY.md carries the same per-crate counts). The 9,086 count below is split across 242 integration test files (via find crates -path '*/tests/*.rs'): fnp-python 200 (194 conformance shards + metamorphic_array_ops + e2e_workflow + golden_native_functions + 3 helper files under tests/common/ and tests/support/), fnp-ufunc 10 (concurrency_safety, fuzz_regression, golden_histogram, isclose_bugs, metamorphic_math, metamorphic_proptest, public_api_golden, test_nansum_empty, test_nat, test_strided), fnp-conformance 6 (codebase_hygiene, concurrency_safety, ledger_hygiene, numpy_reference_ops, profiling_baseline, smoke), fnp-io 6 (fuzz_regression_header, golden_text_io, metamorphic_io, npy_npz_diagnostic, npy_numpy_conformance, savetxt_printf_conformance), fnp-dtype 4, fnp-ndarray 4, fnp-linalg 4, fnp-iter 3, fnp-random 2, fnp-runtime 3 (golden_runtime, runtime_comprehensive, worker_isa_probe); plus inline #[cfg(test)] blocks in each crate's src/lib.rs:
| Crate | Tests | Focus |
|---|---|---|
fnp-ufunc |
2,492 | Core array ops, math, sorting, polynomials, reductions, oracle tests, linalg bridge, FFT (hfft/ihfft), masked cov/corrcoef, gufunc validation, parameter parity, einsum, NaN/Inf/signed-zero edge cases |
fnp-python |
3,969 | PyO3 surface parity across all 499 numpy.__all__ names + 194 dedicated conformance shards covering live callable parity, sorter/side bridging, in-place mutation, generator rejection, dtype preservation, etc. |
fnp-conformance |
409 | Differential parity, metamorphic identities, adversarial fuzzing, witness stability, matmul conformance |
fnp-random |
493 | RNG distributions with statistical conformance, permuted (1D/2D/axis/deterministic), seeding, reproducibility, large-n binomial/multinomial |
fnp-random-core |
5 | Dependency-free SeedSequence and PCG64DXSM deterministic state transforms and reference vectors |
fnp-linalg |
460 | Decompositions, solvers, norms, batch ops, 16 NumPy oracle tests, extreme-scale regression, non-finite parity |
fnp-io |
413 | NPY/NPZ read/write, text formats, compression, 7 format oracle tests, genfromtxt_full, fromfile_text / tofile_text |
fnp-dtype |
276 | Dtype taxonomy, all 324 promotion pairs explicit, cast policy primitives, NumPy byte-width parsing |
fnp-ndarray |
231 | Shape legality, stride calculus, broadcast contracts, overlap detection, multi-axis negative strides, F-order, required_view_nbytes |
fnp-iter |
203 | Transfer-loop selector, NDIter traversal/broadcast/overlap contracts, stateful Nditer (iterindex/multi_index/reset/seek/external-loop), flatiter, ndindex |
fnp-runtime |
135 | Mode split, fail-closed decoding, override-audit gate, risk-aware decision engine, evidence ledger. |
| Total | 9,086 | #[test] functions across all 11 crates, 2026-10-08 count |
Oracle Test Strategy
The oracle suite verifies bit-exact or behaviorally equivalent parity against NumPy across the major subsystems:
- RNG oracle: every distribution produces identical output from the same seed, verified against
numpy.random.Generator(PCG64DXSM(12345)) - Ufunc edge-case tests: NaN propagation, empty arrays, Inf arithmetic, boolean dtype promotion, sort ordering
- Linalg oracle:
det,inv,solve,eig,svd,cholesky,qr,norm,cond,slogdet,lstsq, rank - I/O format tests: NPY round-trip, magic bytes, header dict format, 16-byte alignment