mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 15:42:49 +00:00
87bc97daef
closes #248
19 lines
375 B
Zig
19 lines
375 B
Zig
const io = @import("std").io;
|
|
|
|
const TestFn = struct {
|
|
name: []u8,
|
|
func: extern fn(),
|
|
};
|
|
|
|
extern var zig_test_fn_list: []TestFn;
|
|
|
|
pub fn main(args: [][]u8) -> %void {
|
|
for (zig_test_fn_list) |testFn, i| {
|
|
%%io.stderr.printf("Test {}/{} {}...", i + 1, zig_test_fn_list.len, testFn.name);
|
|
|
|
testFn.func();
|
|
|
|
%%io.stderr.printf("OK\n");
|
|
}
|
|
}
|