noir-frontend-tests

Installation
SKILL.md

Writing noirc_frontend Unit Tests

Tests live under compiler/noirc_frontend/src/tests/. The root module tests.rs defines helpers and declares submodules organized by topic.

Helpers in tests.rs

Importable from submodules via use crate::tests::{...}.

Compilation

Helper Use when
assert_no_errors(src) Program should compile without errors. Panics with "Expected no errors" and prints diagnostics. Returns Context.
assert_no_errors_without_report(src) Same but doesn't print diagnostics on failure.
get_program_errors(src) -> Vec<CompilationError> Get raw error list for manual inspection.
get_program_using_features(src, &[UnstableFeature]) Compile with specific unstable features enabled.

Error Checking with Inline Annotations

Related skills
Installs
1
Repository
noir-lang/noir
GitHub Stars
1.3K
First Seen
Mar 29, 2026