Skip to content

Testing

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

Testing

Wiki hero

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

cargo test --all-features

Integration: tests/gguf_smoke.rs

Builds synthetic GGUF bytes in memory (no external files):

Test Asserts
parses_magic_and_metadata arch, numerics, alignment, tensor dims
extracts_stacked_expert_slices 3 experts, gate/up/down values, stacked_slice
extracts_per_expert_tensors named per-expert tensors, complete weights
rejects_bad_magic UnsupportedFormat messaging
expert_out_of_range ExpertOutOfRange

Unit tests

In-module coverage for cursor/layout helpers where present.

Example

examples/inspect_gguf.rs — CLI-style inspection of a real file when run with a path.


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

Clone this wiki locally