authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-02-27 10:00:15+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-02-27 10:05:29+02:00
log593d23c0d746deae1036b5209c683c1984dd0203
tree64c334c97f35a002abab813a2f76eef570dbb67b
parent4d658f83ed3893cf950615e9f58c2b533525b71d

stage2: get formatted printing (somewhat) working


2 files changed, 15 insertions(+), 4 deletions(-)

lib/std/special/test_runner.zig+14-2
......@@ -141,8 +141,20 @@ pub fn main2() anyerror!void {
141141 }
142142 };
143143 }
144 if (builtin.zig_backend == .stage2_llvm or
145 builtin.zig_backend == .stage2_wasm or
144 if (builtin.zig_backend == .stage2_llvm) {
145 const stderr = std.io.getStdErr().writer();
146 const ok_count = builtin.test_functions.len - skipped - failed;
147 if (ok_count == builtin.test_functions.len) {
148 try stderr.print("All {d} tests passed.\n", .{ok_count});
149 } else {
150 try stderr.print("{d} passed; ", .{ok_count});
151 try stderr.print("{d} skipped; ", .{skipped});
152 try stderr.print("{d} failed.\n", .{failed});
153 }
154 if (failed != 0) {
155 std.process.exit(1);
156 }
157 } else if (builtin.zig_backend == .stage2_wasm or
146158 builtin.zig_backend == .stage2_x86_64)
147159 {
148160 const passed = builtin.test_functions.len - skipped - failed;
src/Sema.zig+1-2
......@@ -10975,8 +10975,7 @@ fn zirCondbr(
1097510975
1097610976 if (try sema.resolveDefinedValue(parent_block, src, cond)) |cond_val| {
1097710977 const body = if (cond_val.toBool()) then_body else else_body;
10978 _ = try sema.analyzeBody(parent_block, body);
10979 return always_noreturn;
10978 return sema.analyzeBodyInner(parent_block, body);
1098010979 }
1098110980
1098210981 const gpa = sema.gpa;