Skip to main content

Module testgen

Module testgen 

Source

Structs§

TestCase
A single test case extracted from a test_* variable

Functions§

extract_test_cases
Extract test_* variable definitions from the AST. Scans source text for // => expected trailing comments.
generate_test_code
Generate Zig test code from test cases. If a test case has an expected value (from // => value comment), generates an assertion; otherwise generates a smoke test (call + discard).