aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-13 20:44:34 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-13 20:44:34 -0700
commit134853f1068624dfda4be0feadd653ed3ee92cc3 (patch)
treea761ad1fbfb7b6841caca03f5dcfc0723d01312f /test
parent579694893ee082ed829b017694fece4e7f41946f (diff)
downloadzig-134853f1068624dfda4be0feadd653ed3ee92cc3.tar.gz
zig-134853f1068624dfda4be0feadd653ed3ee92cc3.zip
stage2: fix tests expected values
Diffstat (limited to 'test')
-rw-r--r--test/stage2/darwin.zig8
-rw-r--r--test/stage2/test.zig10
2 files changed, 12 insertions, 6 deletions
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);