✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
Panic: Mock shape validation failed
Failure Output
Showing last 10 of 26 lines
???:?:?: 0x100ef24ff in _backend_output_emitted.koru_std.koru_compiler.evaluate_comptime_event.handler (???)
???:?:?: 0x100eeda0b in _backend_output_emitted.koru_std.koru_compiler.elaborate_event.handler (???)
???:?:?: 0x100eed08f in _backend_output_emitted.koru_std.koru_compiler.coordinate_event.handler (???)
???:?:?: 0x100eececf in _koru_coordinate (???)
???:?:?: 0x100e7b923 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x100e7ca4f in _backend.main (???)
???:?:?: 0x100e826b7 in _main (???)
???:?:?: 0x18eec7dff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 363: 7922 Abort trap: 6 ./backend output Code
// Test: Test framework reports passing and failing tests
//
// Two ~test bodies — one asserts true, one asserts false.
// post.sh runs `zig test` on the emitted output and inverts
// the exit code: a non-zero zig-test exit means the deliberately
// failing test was correctly detected.
~import std/testing
~tor do-thing {} -> u32
~test(This test passes) {
~do-thing -> 1
~do-thing(): _ |> assert(true)
}
~test(This test should fail) {
~do-thing -> 1
~do-thing(): _ |> assert(false)
}
Flows
flow ~test click a branch to expand · @labels scroll to their anchor
test (This test passes, source: ~do-thing -> 1
~do-thing(): _ |> assert(true))
flow ~test click a branch to expand · @labels scroll to their anchor
test (This test should fail, source: ~do-thing -> 1
~do-thing(): _ |> assert(false))
Test Configuration
Post-validation Script:
#!/bin/bash
# Run the actual Zig tests - this test has a deliberately failing assertion
# We expect zig test to FAIL (non-zero exit) because one test fails
cd "$(dirname "$0")"
# Run zig test on the generated output
output=$(zig test output_emitted.zig 2>&1)
exit_code=$?
echo "$output"
# We EXPECT failure here (exit_code != 0)
# If zig test fails as expected, that's a PASS for this regression test
if [ $exit_code -ne 0 ]; then
echo ""
echo "=== Test correctly detected failure (expected behavior) ==="
exit 0
else
echo ""
echo "=== ERROR: Test should have failed but passed ==="
exit 1
fi