mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 15:42:49 +00:00
Tests: print generated C on test failure
This commit is contained in:
parent
dd1f1487e4
commit
4d778e630a
@ -478,6 +478,10 @@ pub const TestContext = struct {
|
||||
for (all_errors.list) |err| {
|
||||
std.debug.warn(":{}:{}: error: {}\n================\n", .{ err.line + 1, err.column + 1, err.msg });
|
||||
}
|
||||
if (case.cbe) {
|
||||
const C = module.bin_file.cast(link.File.C).?;
|
||||
std.debug.warn("Generated C: \n===============\n{}\n\n===========\n\n", .{C.main.items});
|
||||
}
|
||||
std.debug.warn("Test failed.\n", .{});
|
||||
std.process.exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user