Skip to content

Testing and Fixtures

Raul Montoya Cardenas edited this page Jul 29, 2026 · 2 revisions

Testing and Fixtures

Wiki hero

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)

Commands

cargo test                 # no libhdf5
cargo test --all-features  # fixtures + round-trip + error suites

HDF5 test suites (tests/)

File Focus
hdf5_fixtures.rs Load vendored Python .nir files
hdf5_roundtrip.rs Write/read graph fidelity
hdf5_read_errors.rs Malformed files
hdf5_write_errors.rs Reject bad graphs without clobbering
hdf5_untrusted.rs External links / hostile layouts

Vendored fixtures (tests/fixtures/)

Real files from neuromorphs/NIR (BSD-3), no Python at test time:

File Covers
lif_norse.nir Input/Affine/LIF/Output, f32, absent v_reset
two_lif_neurons.nir Linear+LIF, f64
braille_noDelay_bias_zero.nir CubaLIF, recurrence, multi-edge, dotted names
braille_noDelay_bias_zero_subgraph.nir Nested NIRGraph
cnn_sinabs.nir Conv2d, IF, SumPool2d, Flatten

In-crate unit tests

Wire type exhaustiveness, padding round-trip, link name rules, tensor invariants, graph validation.


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: df72fc9 (main)

Clone this wiki locally