diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-25 13:03:54 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-25 13:03:54 -0700 |
| commit | 399bb2e154395f1f2372eccb10ea41d6ba5ef68f (patch) | |
| tree | 91ca58a20bb65c8a404b74a130f06ab1cacbfce0 /test | |
| parent | 31023de6c4b3957ef356be01b5454426844955a9 (diff) | |
| download | zig-399bb2e154395f1f2372eccb10ea41d6ba5ef68f.tar.gz zig-399bb2e154395f1f2372eccb10ea41d6ba5ef68f.zip | |
astgen: fix array access
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage2/test.zig | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/stage2/test.zig b/test/stage2/test.zig index 4ced83a951..757e03da10 100644 --- a/test/stage2/test.zig +++ b/test/stage2/test.zig @@ -917,29 +917,29 @@ pub fn addCases(ctx: *TestContext) !void { ); // Array access. - //case.addCompareOutput( - // \\export fn _start() noreturn { - // \\ assert("hello"[0] == 'h'); - // \\ - // \\ exit(); - // \\} - // \\ - // \\pub fn assert(ok: bool) void { - // \\ if (!ok) unreachable; // assertion failure - // \\} - // \\ - // \\fn exit() noreturn { - // \\ asm volatile ("syscall" - // \\ : - // \\ : [number] "{rax}" (231), - // \\ [arg1] "{rdi}" (0) - // \\ : "rcx", "r11", "memory" - // \\ ); - // \\ unreachable; - // \\} - //, - // "", - //); + case.addCompareOutput( + \\export fn _start() noreturn { + \\ assert("hello"[0] == 'h'); + \\ + \\ exit(); + \\} + \\ + \\pub fn assert(ok: bool) void { + \\ if (!ok) unreachable; // assertion failure + \\} + \\ + \\fn exit() noreturn { + \\ asm volatile ("syscall" + \\ : + \\ : [number] "{rax}" (231), + \\ [arg1] "{rdi}" (0) + \\ : "rcx", "r11", "memory" + \\ ); + \\ unreachable; + \\} + , + "", + ); // 64bit set stack case.addCompareOutput( |
