Expand description
Test block codegen — compiles PEPL tests { } blocks to WASM functions.
Each test case test "description" { ... } becomes a WASM function
__test_N() that:
- Re-initialises state (calls init() internally)
- Executes the test body (action dispatches, assertions, let bindings)
- Returns void on success, or traps on assertion failure
The host calls __test_count() to discover how many tests exist,
then __test_N() (N = 0, 1, …) to run each.
Functions§
- emit_
test_ body - Compile a single test body into WASM instructions.
- emit_
test_ count - Emit
__test_count() -> i32.