mirror of
https://github.com/ziglang/zig.git
synced 2025-12-12 17:23:09 +00:00
* Merge io.InStream and io.OutStream into io.File
* Introduce io.OutStream and io.InStream interfaces
- io.File implements both of these
* Move mem.IncrementingAllocator to heap.IncrementingAllocator
Instead of:
```
%return std.io.stderr.printf("hello\n");
```
now do:
```
std.debug.warn("hello\n");
```
To print to stdout, see `io.getStdOut()`.
* Rename std.ArrayList.resizeDown to std.ArrayList.shrink.
16 lines
355 B
Zig
16 lines
355 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);
|
|
|
|
test_fn.func();
|
|
|
|
warn("OK\n");
|
|
}
|
|
}
|