We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.10.0-dev.2083+13d1798ea
run zig test phantomErrorTrace.zig
zig test phantomErrorTrace.zig
// phantomErrorTrace.zig const std = @import("std"); fn alwaysErrors() !void { return error.BUG_ThisErrorShouldNotAppearInAnyTrace; } test "test expected error" { try std.testing.expectError(error.BUG_ThisErrorShouldNotAppearInAnyTrace, alwaysErrors()); } test "trigger error trace" { return error.WeExpectToSeeThisInTheTrace; }
should only see error trace for the second test
1/2 test "test expected error"... OK 2/2 test "trigger error trace"... FAIL (WeExpectToSeeThisInTheTrace) FAIL (WeExpectToSeeThisInTheTrace) /Users/daniel/Developer/zigtests/phantomerrortrace.zig:14:5: 0x1005a992f in test "trigger error trace" (test) return error.WeExpectToSeeThisInTheTrace; ^ 1 passed; 0 skipped; 1 failed.
Error trace from the first test appears in the error trace for the second test
1/2 test "test expected error"... OK 2/2 test "trigger error trace"... FAIL (WeExpectToSeeThisInTheTrace) FAIL (WeExpectToSeeThisInTheTrace) /Users/daniel/Developer/zigtests/phantomerrortrace.zig:6:5: 0x10085dce7 in alwaysErrors (test) return error.BUG_ThisErrorShouldNotAppearInAnyTrace; ^ /Users/daniel/Developer/zigtests/phantomerrortrace.zig:14:5: 0x10085cd3b in test "trigger error trace" (test) return error.WeExpectToSeeThisInTheTrace; ^ 1 passed; 0 skipped; 1 failed.
The text was updated successfully, but these errors were encountered:
Very likely to be a duplicate of #1923
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.10.0-dev.2083+13d1798ea
Steps to Reproduce
run
zig test phantomErrorTrace.zig
Expected Behavior
should only see error trace for the second test
Actual Behavior
Error trace from the first test appears in the error trace for the second test
The text was updated successfully, but these errors were encountered: