authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-14 23:15:56+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-14 23:15:56+07:00
log2ee83e76f7acc4275f654d2a99d0df2715cec17f
tree4af15bb6707fda2e6f5466ecff4b6b8b7b7be1fa
parent9201fbe85bff4ae40573b64382131f779a7ed85c

stage2: Adjust line numbers in tests


2 files changed, 7 insertions(+), 7 deletions(-)

test/stage2/aarch64.zig+1-1
...@@ -159,7 +159,7 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -159,7 +159,7 @@ pub fn addCases(ctx: *TestContext) !void {
159 {159 {
160 var case = ctx.exe("hello world with updates", macos_aarch64);160 var case = ctx.exe("hello world with updates", macos_aarch64);
161 case.addError("", &[_][]const u8{161 case.addError("", &[_][]const u8{
162 ":108:9: error: struct 'tmp.tmp' has no member named 'main'",162 ":109:9: error: struct 'tmp.tmp' has no member named 'main'",
163 });163 });
164164
165 // Incorrect return type165 // Incorrect return type
test/stage2/x86_64.zig+6-6
...@@ -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 2800 \\// 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);
19261926
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 });
19301930
1931 // Incorrect return type1931 // 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 });
21812181
2182 // Incorrect return type2182 // Incorrect return type