✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
Panic: Mock shape validation failed
Failure Output
Showing last 10 of 26 lines
???:?:?: 0x1021ee4ff in _backend_output_emitted.koru_std.koru_compiler.evaluate_comptime_event.handler (???)
???:?:?: 0x1021e9a0b in _backend_output_emitted.koru_std.koru_compiler.elaborate_event.handler (???)
???:?:?: 0x1021e908f in _backend_output_emitted.koru_std.koru_compiler.coordinate_event.handler (???)
???:?:?: 0x1021e8ecf in _koru_coordinate (???)
???:?:?: 0x102177923 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x102178a4f in _backend.main (???)
???:?:?: 0x10217e6b7 in _main (???)
???:?:?: 0x18eec7dff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 363: 7455 Abort trap: 6 ./backend output Code
// Test: Basic test transform with mock substitution
//
// Tests that:
// 1. Mocks are substituted inline (flow pruning)
// 2. Bindings are extracted from mocked branch values
// 3. Assert can verify actual values
~import std/testing
// Impure event - needs mock in tests (no proc = impure by default)
~tor get-balance {} -> u32
// Test: Mock value is inlined, binding extracted, value verified
~test(Mock value inlined with binding) {
~get-balance -> 100
~get-balance(): a |> assert(a == 100)
}
Flows
flow ~test click a branch to expand · @labels scroll to their anchor
test (Mock value inlined with binding, source: ~get-balance -> 100
~get-balance(): a |> assert(a == 100))
Test Configuration
Post-validation Script:
#!/bin/bash
# Run the actual Zig tests to verify mocks work correctly
cd "$(dirname "$0")"
# Run zig test on the generated output
zig test output_emitted.zig 2>&1
exit $?