| ... | @@ -719,7 +719,7 @@ pub fn addCases(ctx: *TestContext) !void { | ... | @@ -719,7 +719,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 719 | ); | 719 | ); |
| 720 | switch (target.getOsTag()) { | 720 | switch (target.getOsTag()) { |
| 721 | .linux => try case.files.append(.{ | 721 | .linux => try case.files.append(.{ |
| 722 | .src = | 722 | .src = |
| 723 | \\pub fn print() void { | 723 | \\pub fn print() void { |
| 724 | \\ asm volatile ("syscall" | 724 | \\ asm volatile ("syscall" |
| 725 | \\ : | 725 | \\ : |
| ... | @@ -735,7 +735,7 @@ pub fn addCases(ctx: *TestContext) !void { | ... | @@ -735,7 +735,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 735 | .path = "print.zig", | 735 | .path = "print.zig", |
| 736 | }), | 736 | }), |
| 737 | .macos => try case.files.append(.{ | 737 | .macos => try case.files.append(.{ |
| 738 | .src = | 738 | .src = |
| 739 | \\extern "c" fn write(usize, usize, usize) usize; | 739 | \\extern "c" fn write(usize, usize, usize) usize; |
| 740 | \\ | 740 | \\ |
| 741 | \\pub fn print() void { | 741 | \\pub fn print() void { |
| ... | @@ -796,7 +796,7 @@ pub fn addCases(ctx: *TestContext) !void { | ... | @@ -796,7 +796,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 796 | ); | 796 | ); |
| 797 | switch (target.getOsTag()) { | 797 | switch (target.getOsTag()) { |
| 798 | .linux => try case.files.append(.{ | 798 | .linux => try case.files.append(.{ |
| 799 | .src = | 799 | .src = |
| 800 | \\// dummy comment to make print be on line 2 | 800 | \\// dummy comment to make print be on line 2 |
| 801 | \\fn print() void { | 801 | \\fn print() void { |
| 802 | \\ asm volatile ("syscall" | 802 | \\ asm volatile ("syscall" |
| ... | @@ -813,7 +813,7 @@ pub fn addCases(ctx: *TestContext) !void { | ... | @@ -813,7 +813,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 813 | .path = "print.zig", | 813 | .path = "print.zig", |
| 814 | }), | 814 | }), |
| 815 | .macos => try case.files.append(.{ | 815 | .macos => try case.files.append(.{ |
| 816 | .src = | 816 | .src = |
| 817 | \\extern "c" fn write(usize, usize, usize) usize; | 817 | \\extern "c" fn write(usize, usize, usize) usize; |
| 818 | \\fn print() void { | 818 | \\fn print() void { |
| 819 | \\ _ = write(1, @ptrToInt("Hello, World!\n"), 14); | 819 | \\ _ = write(1, @ptrToInt("Hello, World!\n"), 14); |
| ... | @@ -1925,7 +1925,7 @@ fn addLinuxTestCases(ctx: *TestContext) !void { | ... | @@ -1925,7 +1925,7 @@ fn addLinuxTestCases(ctx: *TestContext) !void { |
| 1925 | var case = ctx.exe("hello world with updates", linux_x64); | 1925 | var case = ctx.exe("hello world with updates", linux_x64); |
| 1926 | | 1926 | |
| 1927 | case.addError("", &[_][]const u8{ | 1927 | case.addError("", &[_][]const u8{ |
| 1928 | ":108:9: error: struct 'tmp.tmp' has no member named 'main'", | 1928 | ":109:9: error: struct 'tmp.tmp' has no member named 'main'", |
| 1929 | }); | 1929 | }); |
| 1930 | | 1930 | |
| 1931 | // Incorrect return type | 1931 | // Incorrect return type |
| ... | @@ -2176,7 +2176,7 @@ fn addMacOsTestCases(ctx: *TestContext) !void { | ... | @@ -2176,7 +2176,7 @@ fn addMacOsTestCases(ctx: *TestContext) !void { |
| 2176 | { | 2176 | { |
| 2177 | var case = ctx.exe("darwin hello world with updates", macos_x64); | 2177 | var case = ctx.exe("darwin hello world with updates", macos_x64); |
| 2178 | case.addError("", &[_][]const u8{ | 2178 | case.addError("", &[_][]const u8{ |
| 2179 | ":108:9: error: struct 'tmp.tmp' has no member named 'main'", | 2179 | ":109:9: error: struct 'tmp.tmp' has no member named 'main'", |
| 2180 | }); | 2180 | }); |
| 2181 | | 2181 | |
| 2182 | // Incorrect return type | 2182 | // Incorrect return type |