authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-05 23:47:05-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-05 23:47:05-07:00
log5cf138e512a06dca65b737f27e4493cdfb3b7ddb
tree6d68e29c3f5382ed0971a434ecb4dd614eb05906
parent39ec3d311673716e145957d6d81f9d4ec7848471

delete bad behavior test

As pointed out in the issue this behavior test branches on an undefined value. That's not valid Zig code. Also behavior tests should not depend on the standard library in this manner. They need to minimally isolate the specific language thing that is being tested. Closes #12681

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

test/behavior/basic.zig-27
...@@ -1039,33 +1039,6 @@ test "inline call of function with a switch inside the return statement" {...@@ -1039,33 +1039,6 @@ test "inline call of function with a switch inside the return statement" {
1039 try expect(S.foo(1) == 1);1039 try expect(S.foo(1) == 1);
1040}1040}
10411041
1042test "namespace lookup ignores decl causing the lookup" {
1043 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
1044 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
1045 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
1046
1047 if (builtin.zig_backend == .stage2_llvm) {
1048 // regressed with LLVM 15
1049 // https://github.com/ziglang/zig/issues/12681
1050 return error.SkipZigTest;
1051 }
1052
1053 const S = struct {
1054 fn Mixin(comptime T: type) type {
1055 return struct {
1056 fn foo() void {
1057 const set = std.EnumSet(T.E).init(undefined);
1058 _ = set;
1059 }
1060 };
1061 }
1062
1063 const E = enum { a, b };
1064 usingnamespace Mixin(@This());
1065 };
1066 _ = S.foo();
1067}
1068
1069test "ambiguous reference error ignores current declaration" {1042test "ambiguous reference error ignores current declaration" {
1070 const S = struct {1043 const S = struct {
1071 const foo = 666;1044 const foo = 666;