| ... | ... | @@ -234,25 +234,33 @@ pub fn log( |
| 234 | 234 | /// work-in-progress backends can handle it. |
| 235 | 235 | pub fn mainSimple() anyerror!void { |
| 236 | 236 | const enable_print = false; |
| 237 | const print_all = false; |
| 237 | 238 | |
| 238 | 239 | var passed: u64 = 0; |
| 239 | 240 | var skipped: u64 = 0; |
| 240 | 241 | var failed: u64 = 0; |
| 241 | 242 | const stderr = if (enable_print) std.io.getStdErr() else {}; |
| 242 | 243 | for (builtin.test_functions) |test_fn| { |
| 244 | if (enable_print and print_all) { |
| 245 | stderr.writeAll(test_fn.name) catch {}; |
| 246 | stderr.writeAll("... ") catch {}; |
| 247 | } |
| 243 | 248 | test_fn.func() catch |err| { |
| 244 | | if (enable_print) stderr.writeAll(test_fn.name) catch {}; |
| 249 | if (enable_print and !print_all) { |
| 250 | stderr.writeAll(test_fn.name) catch {}; |
| 251 | stderr.writeAll("... ") catch {}; |
| 252 | } |
| 245 | 253 | if (err != error.SkipZigTest) { |
| 246 | | if (enable_print) stderr.writeAll("... FAIL\n") catch {}; |
| 254 | if (enable_print) stderr.writeAll("FAIL\n") catch {}; |
| 247 | 255 | failed += 1; |
| 248 | 256 | if (!enable_print) return err; |
| 249 | 257 | continue; |
| 250 | 258 | } |
| 251 | | if (enable_print) stderr.writeAll("... SKIP\n") catch {}; |
| 259 | if (enable_print) stderr.writeAll("SKIP\n") catch {}; |
| 252 | 260 | skipped += 1; |
| 253 | 261 | continue; |
| 254 | 262 | }; |
| 255 | | //if (enable_print) stderr.writeAll("... PASS\n") catch {}; |
| 263 | if (enable_print and print_all) stderr.writeAll("PASS\n") catch {}; |
| 256 | 264 | passed += 1; |
| 257 | 265 | } |
| 258 | 266 | if (enable_print) { |