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