✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
Panic: Mock shape validation failed
Failure Output
Showing last 10 of 55 lines
^
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/395_TESTING/395_007_failing_test/backend.zig:9445:51: 0x104d53077 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^
/opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:627:37: 0x104d5a6a7 in main (backend)
const result = root.main() catch |err| {
^
???:?:?: 0x184e55d53 in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 33: 6716 Abort trap: 6 ./backend output Code
~import "$std/testing"
~event do_thing {}
// Test that passes - assert true
~test(This test passes) {
~do_thing = done {}
~do_thing() |> assert(true)
}
// Test that fails deliberately - assert false
~test(This test should fail) {
~do_thing = done {}
~do_thing() |> assert(false)
}
pub fn main() void {}
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