authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-29 19:35:29-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-07 22:43:51-07:00
log7eae26d60895dc62fa62f6562a4eeecb8685aae5
tree55b633dfae9a7b33ec8b4d720140e663eddc7e8a
parent0e37ff0d591dd75ceec9208196bec29efaec607a

delete bad behavior test

behavior tests must not depend on std.io

1 files changed, 0 insertions(+), 18 deletions(-)

test/behavior/error.zig-18
...@@ -1032,24 +1032,6 @@ test "function called at runtime is properly analyzed for inferred error set" {...@@ -1032,24 +1032,6 @@ test "function called at runtime is properly analyzed for inferred error set" {
1032 };1032 };
1033}1033}
10341034
1035test "generic type constructed from inferred error set of unresolved function" {
1036 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
1037 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
1038 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
1039
1040 const S = struct {
1041 fn write(_: void, bytes: []const u8) !usize {
1042 _ = bytes;
1043 return 0;
1044 }
1045 const T = std.io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).@"fn".return_type.?).error_union.error_set, write);
1046 fn writer() T {
1047 return .{ .context = {} };
1048 }
1049 };
1050 _ = std.io.multiWriter(.{S.writer()});
1051}
1052
1053test "errorCast to adhoc inferred error set" {1035test "errorCast to adhoc inferred error set" {
1054 const S = struct {1036 const S = struct {
1055 inline fn baz() !i32 {1037 inline fn baz() !i32 {