diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage2/x86_64.zig | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/test/stage2/x86_64.zig b/test/stage2/x86_64.zig index 878964e8a2..b0fe97e8f9 100644 --- a/test/stage2/x86_64.zig +++ b/test/stage2/x86_64.zig @@ -1761,6 +1761,25 @@ pub fn addCases(ctx: *TestContext) !void { \\} , ""); } + + { + var case = ctx.exe("access slice element by index - slice_elem_val", target); + case.addCompareOutput( + \\var array = [_]usize{ 0, 42, 123, 34 }; + \\var slice: []const usize = &array; + \\ + \\pub fn main() void { + \\ assert(slice[0] == 0); + \\ assert(slice[1] == 42); + \\ assert(slice[2] == 123); + \\ assert(slice[3] == 34); + \\} + \\ + \\fn assert(ok: bool) void { + \\ if (!ok) unreachable; + \\} + , ""); + } } } @@ -2014,26 +2033,6 @@ fn addLinuxTestCases(ctx: *TestContext) !void { \\} , ""); } - - { - // TODO fixing this will enable zig test on macOS - var case = ctx.exe("access slice element by index - slice_elem_val", linux_x64); - case.addCompareOutput( - \\var array = [_]usize{ 0, 42, 123, 34 }; - \\var slice: []const usize = &array; - \\ - \\pub fn main() void { - \\ assert(slice[0] == 0); - \\ assert(slice[1] == 42); - \\ assert(slice[2] == 123); - \\ assert(slice[3] == 34); - \\} - \\ - \\fn assert(ok: bool) void { - \\ if (!ok) unreachable; - \\} - , ""); - } } fn addMacOsTestCases(ctx: *TestContext) !void { |
