aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-05 23:47:05 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-05 23:47:05 -0700
commit5cf138e512a06dca65b737f27e4493cdfb3b7ddb (patch)
tree6d68e29c3f5382ed0971a434ecb4dd614eb05906 /test/behavior
parent39ec3d311673716e145957d6d81f9d4ec7848471 (diff)
downloadzig-5cf138e512a06dca65b737f27e4493cdfb3b7ddb.tar.gz
zig-5cf138e512a06dca65b737f27e4493cdfb3b7ddb.zip
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
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/basic.zig27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig
index 9747206a76..777784f48c 100644
--- a/test/behavior/basic.zig
+++ b/test/behavior/basic.zig
@@ -1039,33 +1039,6 @@ test "inline call of function with a switch inside the return statement" {
try expect(S.foo(1) == 1);
}
-test "namespace lookup ignores decl causing the lookup" {
- if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
-
- if (builtin.zig_backend == .stage2_llvm) {
- // regressed with LLVM 15
- // https://github.com/ziglang/zig/issues/12681
- return error.SkipZigTest;
- }
-
- const S = struct {
- fn Mixin(comptime T: type) type {
- return struct {
- fn foo() void {
- const set = std.EnumSet(T.E).init(undefined);
- _ = set;
- }
- };
- }
-
- const E = enum { a, b };
- usingnamespace Mixin(@This());
- };
- _ = S.foo();
-}
-
test "ambiguous reference error ignores current declaration" {
const S = struct {
const foo = 666;