Open-Source Wikis

/

wgpu

/

Crates

/

naga-test

gfx-rs/wgpu

naga-test

naga-test (naga-test/) is a tiny helper crate that holds shared test utilities used by both naga and other workspace tests that touch shader translation. It exposes helpers for loading fixtures, comparing snapshots, and asserting on validation outcomes.

Purpose

  • Avoid duplicating fixture loading and snapshot comparison code across naga/tests/, tests/, and benches/.
  • Stay small: it's purely glue.

Directory layout

naga-test/
├── Cargo.toml
└── src/                 # very small crate

It's a path = "./naga-test" workspace dependency declared as naga-test = { path = "./naga-test" } in the root Cargo.toml.

Integration points

  • Used by the tests integration tests (tests/Cargo.toml's dev-dependencies) and the naga snapshot harness in naga/tests/.

Modifying

If you find yourself wanting another shared helper for snapshot or validation tests, add it here rather than copying it into multiple test crates.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

naga-test – wgpu wiki | Factory