| 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); |
| 3 | |
| 4 | pub fn main() void { |
| 5 | var ok_count: usize = 0; |
| 6 | var skip_count: usize = 0; |
| 7 | var fail_count: usize = 0; |
| 8 | |
| 9 | for (builtin.test_functions) |test_fn| { |
| 10 | if (test_fn.func()) |_| { |
| 11 | ok_count += 1; |
| 12 | } else |err| switch (err) { |
| 13 | error.SkipZigTest => skip_count += 1, |
| 14 | else => fail_count += 1, |
| 15 | } |
| 16 | } |
| 17 | if (ok_count != 1 or skip_count != 1 or fail_count != 1) { |
| 18 | std.process.exit(1); |
| 19 | } |
| 20 | } |