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.11.0-dev.3312+ab37ab33c
I was following the tutorials on the Zig documentation for the multiple defer statements and wrote the following:
const std = @import("std"); test "Defer Multiple" { std.debug.print("\n0...", .{ }); defer { std.debug.print("\n3...", .{ }); } defer { std.debug.print("\n2...", .{ }); } defer { std.debug.print("\n1...", .{ }); } }
When running this block of code with zig test, the output was:
Test [1/1] test.Defer Multiple... 0... 1... 2... All 1 tests passed.
Test [1/1] test.Defer Multiple... 0... 1... 2... 3... All 1 tests passed.
The text was updated successfully, but these errors were encountered:
Duplicate of #6856. In general, you shouldn't use stdio in tests
Sorry, something went wrong.
Thanks for the quick response - I'll go look at that other issue and familiarize myself with it.
I see now that the expect function signals a failure through error handling which inadvertently answers my more fundamental question.
Much appreciated!
No branches or pull requests
Zig Version
0.11.0-dev.3312+ab37ab33c
Steps to Reproduce and Observed Behavior
I was following the tutorials on the Zig documentation for the multiple defer statements and wrote the following:
When running this block of code with zig test, the output was:
Expected Behavior
The text was updated successfully, but these errors were encountered: