What problem does it solve?
Writing tests for the Noir compiler frontend requires knowing which helper functions to use, how inline error annotations work, and how to avoid common pitfalls like warnings being treated as errors. This Skill provides the conventions and patterns needed to write correct noirc_frontend unit tests.
Core Features & Use Cases
- Test Helper Reference: Documents compilation helpers like assert_no_errors, get_program_errors, and check_errors, plus monomorphization utilities from test_utils.
- Inline Error Annotation Syntax: Explains the ^^^ and ~~~ marker syntax for asserting primary and secondary compiler error spans and messages.
- Test Patterns: Provides templates for regression tests, should_panic reproduction tests for unfixed bugs, and expected-error tests.
- Use Case: When fixing a compiler bug in noirc_frontend, use this Skill to write a regression test that compiles a Noir snippet with assert_no_errors and links the GitHub issue.
Quick Start
Write a noirc_frontend regression test for a Noir snippet that should compile without errors, following the skill's patterns and helpers.