zig/std/special/test_runner.zig
2018-01-31 01:51:31 -05:00

16 lines
356 B
Zig

const std = @import("std");
const io = std.io;
const builtin = @import("builtin");
const test_fn_list = builtin.__zig_test_fn_slice;
const warn = std.debug.warn;
pub fn main() !void {
for (test_fn_list) |test_fn, i| {
warn("Test {}/{} {}...", i + 1, test_fn_list.len, test_fn.name);
try test_fn.func();
warn("OK\n");
}
}