diff --git a/BRANCH_TODO b/BRANCH_TODO index 1f27224f80..250cd24bc1 100644 --- a/BRANCH_TODO +++ b/BRANCH_TODO @@ -1,4 +1,10 @@ * get stage2 tests passing + - after the error from an empty file, "has no member main" is invalidated + but the comptime block incorrectly does not get re-run + - redundant comptime wrong source loc + - redeclaration of 'foo' not showing 'previously declared here' + - segfault in one of the tests + - memory leaks * modify stage2 tests so that only 1 uses _start and the rest use pub fn main * modify stage2 CBE tests so that only 1 uses pub export main and the diff --git a/test/stage2/darwin.zig b/test/stage2/darwin.zig index 36549b3f40..9f0469c319 100644 --- a/test/stage2/darwin.zig +++ b/test/stage2/darwin.zig @@ -13,13 +13,17 @@ pub fn addCases(ctx: *TestContext) !void { }; { var case = ctx.exe("hello world with updates", target); - case.addError("", &[_][]const u8{"error: no entry point found"}); + case.addError("", &[_][]const u8{ + ":84:9: error: struct 'test_case.test_case' has no member named 'main'", + }); // Incorrect return type case.addError( \\pub export fn _start() noreturn { \\} - , &[_][]const u8{":2:1: error: expected noreturn, found void"}); + , &[_][]const u8{ + ":2:1: error: expected noreturn, found void", + }); // Regular old hello world case.addCompareOutput( diff --git a/test/stage2/test.zig b/test/stage2/test.zig index 32bf36d9bb..ad9cad0c0c 100644 --- a/test/stage2/test.zig +++ b/test/stage2/test.zig @@ -24,7 +24,9 @@ pub fn addCases(ctx: *TestContext) !void { { var case = ctx.exe("hello world with updates", linux_x64); - case.addError("", &[_][]const u8{"error: no entry point found"}); + case.addError("", &[_][]const u8{ + ":84:9: error: struct 'test_case.test_case' has no member named 'main'", + }); // Incorrect return type case.addError( @@ -321,7 +323,7 @@ pub fn addCases(ctx: *TestContext) !void { { var case = ctx.exe("multiplying numbers at runtime and comptime", linux_x64); case.addCompareOutput( - \\export fn _start() noreturn { + \\pub export fn _start() noreturn { \\ mul(3, 4); \\ \\ exit(); @@ -345,7 +347,7 @@ pub fn addCases(ctx: *TestContext) !void { ); // comptime function call case.addCompareOutput( - \\export fn _start() noreturn { + \\pub export fn _start() noreturn { \\ exit(); \\} \\ @@ -369,7 +371,7 @@ pub fn addCases(ctx: *TestContext) !void { ); // Inline function call case.addCompareOutput( - \\export fn _start() noreturn { + \\pub export fn _start() noreturn { \\ var x: usize = 5; \\ const y = mul(2, 3, x); \\ exit(y - 30);