✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
Panic: Mock shape validation failed
Failure Output
Showing last 10 of 26 lines
???:?:?: 0x1046724ff in _backend_output_emitted.koru_std.koru_compiler.evaluate_comptime_event.handler (???)
???:?:?: 0x10466da0b in _backend_output_emitted.koru_std.koru_compiler.elaborate_event.handler (???)
???:?:?: 0x10466d08f in _backend_output_emitted.koru_std.koru_compiler.coordinate_event.handler (???)
???:?:?: 0x10466cecf in _koru_coordinate (???)
???:?:?: 0x1045fb923 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x1045fca4f in _backend.main (???)
???:?:?: 0x1046026b7 in _main (???)
???:?:?: 0x18eec7dff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 363: 7871 Abort trap: 6 ./backend output Code
// Test: Impure event with override works
//
// Pair to 395_005 (impure event without override errors).
// Verifies that the mock substitution replaces the impure
// proc body and the mocked branch value propagates through
// the binding.
~import std/testing
~tor fetch-user { id: u32 } -> string
~proc fetch-user|zig {
return "Alice";
}
~test(Impure event with override works) {
~fetch-user -> "TestUser"
~fetch-user(id: 1): u |> assert(u.len == 8)
}
Flows
flow ~test click a branch to expand · @labels scroll to their anchor
test (Impure event with override works, source: ~fetch-user -> "TestUser"
~fetch-user(id: 1): u |> assert(u.len == 8))
Test Configuration
Post-validation Script:
#!/bin/bash
# Run the actual Zig tests to verify impure events work WITH mocks
cd "$(dirname "$0")"
# Run zig test on the generated output
zig test output_emitted.zig 2>&1
exit $?