diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-01 23:46:57 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-01 23:46:57 -0700 |
| commit | ed2364a1480f99a7380285cec15ff1962d9df519 (patch) | |
| tree | da488724987e43e11a5938589a9df5b92c79d8c4 /test/behavior/struct.zig | |
| parent | 6f303c01f3e06fe8203563065ea32537f6eff456 (diff) | |
| download | zig-ed2364a1480f99a7380285cec15ff1962d9df519.tar.gz zig-ed2364a1480f99a7380285cec15ff1962d9df519.zip | |
stage2: introduce anonymous struct literals
Diffstat (limited to 'test/behavior/struct.zig')
| -rw-r--r-- | test/behavior/struct.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig index 20123e8014..c2656a7393 100644 --- a/test/behavior/struct.zig +++ b/test/behavior/struct.zig @@ -930,7 +930,9 @@ test "anonymous struct literal syntax" { } test "fully anonymous struct" { - if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO const S = struct { fn doTheTest() !void { @@ -974,7 +976,7 @@ test "fully anonymous list literal" { comptime try S.doTheTest(); } -test "anonymous struct literal assigned to variable" { +test "tuple assigned to variable" { if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO var vec = .{ @as(i32, 22), @as(i32, 55), @as(i32, 99) }; @@ -995,7 +997,7 @@ test "comptime struct field" { comptime try expect(foo.b == 1234); } -test "anon struct literal field value initialized with fn call" { +test "tuple element initialized with fn call" { if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO const S = struct { |
