mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 08:03:08 +00:00
Some tests are now failing due to debug info changes, some tests now pass due to improved compiler functionality.
18 lines
676 B
Zig
18 lines
676 B
Zig
const io = @import("std").io;
|
|
const builtin = @import("builtin");
|
|
|
|
pub fn write(_: void, bytes: []const u8) !usize {
|
|
_ = bytes;
|
|
return 0;
|
|
}
|
|
pub fn writer() io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write) {
|
|
return io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write){ .context = {} };
|
|
}
|
|
|
|
test "crash" {
|
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
|
_ = io.multiWriter(.{writer()});
|
|
}
|