aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/stage2/compare_output.zig8
-rw-r--r--test/stage2/compile_errors.zig24
-rw-r--r--test/stage2/zir.zig16
3 files changed, 24 insertions, 24 deletions
diff --git a/test/stage2/compare_output.zig b/test/stage2/compare_output.zig
index 4332ed120c..902c1e493f 100644
--- a/test/stage2/compare_output.zig
+++ b/test/stage2/compare_output.zig
@@ -17,9 +17,9 @@ pub fn addCases(ctx: *TestContext) !void {
}
{
- var case = try ctx.addExe("hello world with updates", linux_x64, .Zig);
+ var case = ctx.addExe("hello world with updates", linux_x64, .Zig);
// Regular old hello world
- try case.addCompareOutput(
+ case.addCompareOutput(
\\export fn _start() noreturn {
\\ print();
\\
@@ -51,7 +51,7 @@ pub fn addCases(ctx: *TestContext) !void {
"Hello, World!\n",
);
// Now change the message only
- try case.addCompareOutput(
+ case.addCompareOutput(
\\export fn _start() noreturn {
\\ print();
\\
@@ -83,7 +83,7 @@ pub fn addCases(ctx: *TestContext) !void {
"What is up? This is a longer message that will force the data to be relocated in virtual address space.\n",
);
// Now we print it twice.
- try case.addCompareOutput(
+ case.addCompareOutput(
\\export fn _start() noreturn {
\\ print();
\\ print();
diff --git a/test/stage2/compile_errors.zig b/test/stage2/compile_errors.zig
index 4f4ec611db..1ee8e9184b 100644
--- a/test/stage2/compile_errors.zig
+++ b/test/stage2/compile_errors.zig
@@ -9,7 +9,7 @@ const linux_x64 = std.zig.CrossTarget{
};
pub fn addCases(ctx: *TestContext) !void {
- try ctx.addError("call undefined local", linux_x64, .ZIR,
+ ctx.addError("call undefined local", linux_x64, .ZIR,
\\@noreturn = primitive(noreturn)
\\
\\@start_fnty = fntype([], @noreturn, cc=Naked)
@@ -19,7 +19,7 @@ pub fn addCases(ctx: *TestContext) !void {
// TODO: address inconsistency in this message and the one in the next test
, &[_][]const u8{":5:13: error: unrecognized identifier: %test"});
- try ctx.addError("call with non-existent target", linux_x64, .ZIR,
+ ctx.addError("call with non-existent target", linux_x64, .ZIR,
\\@noreturn = primitive(noreturn)
\\
\\@start_fnty = fntype([], @noreturn, cc=Naked)
@@ -31,7 +31,7 @@ pub fn addCases(ctx: *TestContext) !void {
, &[_][]const u8{":5:13: error: decl 'notafunc' not found"});
// TODO: this error should occur at the call site, not the fntype decl
- try ctx.addError("call naked function", linux_x64, .ZIR,
+ ctx.addError("call naked function", linux_x64, .ZIR,
\\@noreturn = primitive(noreturn)
\\
\\@start_fnty = fntype([], @noreturn, cc=Naked)
@@ -46,51 +46,51 @@ pub fn addCases(ctx: *TestContext) !void {
// TODO: re-enable these tests.
// https://github.com/ziglang/zig/issues/1364
- // try ctx.addError("Export same symbol twice", linux_x64, .Zig,
+ // ctx.addError("Export same symbol twice", linux_x64, .Zig,
// \\export fn entry() void {}
// \\export fn entry() void {}
// , &[_][]const u8{":2:1: error: exported symbol collision"});
- // try ctx.addError("Missing function name", linux_x64, .Zig,
+ // ctx.addError("Missing function name", linux_x64, .Zig,
// \\fn() void {}
// , &[_][]const u8{":1:3: error: missing function name"});
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\comptime {
// \\ return;
// \\}
//, "1.zig", 2, 5, "return expression outside function definition");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\export fn entry() void {
// \\ defer return;
// \\}
//, "1.zig", 2, 11, "cannot return from defer expression");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\export fn entry() c_int {
// \\ return 36893488147419103232;
// \\}
//, "1.zig", 2, 12, "integer value '36893488147419103232' cannot be stored in type 'c_int'");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\comptime {
// \\ var a: *align(4) align(4) i32 = 0;
// \\}
//, "1.zig", 2, 22, "Extra align qualifier");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\comptime {
// \\ var b: *const const i32 = 0;
// \\}
//, "1.zig", 2, 19, "Extra align qualifier");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\comptime {
// \\ var c: *volatile volatile i32 = 0;
// \\}
//, "1.zig", 2, 22, "Extra align qualifier");
- //try ctx.testCompileError(
+ //ctx.testCompileError(
// \\comptime {
// \\ var d: *allowzero allowzero i32 = 0;
// \\}
diff --git a/test/stage2/zir.zig b/test/stage2/zir.zig
index a3dec10e73..17d5ce9b5b 100644
--- a/test/stage2/zir.zig
+++ b/test/stage2/zir.zig
@@ -9,7 +9,7 @@ const linux_x64 = std.zig.CrossTarget{
};
pub fn addCases(ctx: *TestContext) !void {
- try ctx.addTransform("referencing decls which appear later in the file", linux_x64, .ZIR,
+ ctx.addTransform("referencing decls which appear later in the file", linux_x64, .ZIR,
\\@void = primitive(void)
\\@fnty = fntype([], @void, cc=C)
\\
@@ -32,7 +32,7 @@ pub fn addCases(ctx: *TestContext) !void {
\\})
\\
);
- try ctx.addTransform("elemptr, add, cmp, condbr, return, breakpoint", linux_x64, .ZIR,
+ ctx.addTransform("elemptr, add, cmp, condbr, return, breakpoint", linux_x64, .ZIR,
\\@void = primitive(void)
\\@usize = primitive(usize)
\\@fnty = fntype([], @void, cc=C)
@@ -86,8 +86,8 @@ pub fn addCases(ctx: *TestContext) !void {
);
{
- var case = try ctx.addObj("reference cycle with compile error in the cycle", linux_x64, .ZIR);
- try case.addTransform(
+ var case = ctx.addObj("reference cycle with compile error in the cycle", linux_x64, .ZIR);
+ case.addTransform(
\\@void = primitive(void)
\\@fnty = fntype([], @void, cc=C)
\\
@@ -133,7 +133,7 @@ pub fn addCases(ctx: *TestContext) !void {
\\
);
// Now we introduce a compile error
- try case.addError(
+ case.addError(
\\@void = primitive(void)
\\@fnty = fntype([], @void, cc=C)
\\
@@ -163,7 +163,7 @@ pub fn addCases(ctx: *TestContext) !void {
// Now we remove the call to `a`. `a` and `b` form a cycle, but no entry points are
// referencing either of them. This tests that the cycle is detected, and the error
// goes away.
- try case.addTransform(
+ case.addTransform(
\\@void = primitive(void)
\\@fnty = fntype([], @void, cc=C)
\\
@@ -207,7 +207,7 @@ pub fn addCases(ctx: *TestContext) !void {
return;
}
- try ctx.addCompareOutput("hello world ZIR", .ZIR,
+ ctx.addCompareOutput("hello world ZIR", .ZIR,
\\@noreturn = primitive(noreturn)
\\@void = primitive(void)
\\@usize = primitive(usize)
@@ -265,7 +265,7 @@ pub fn addCases(ctx: *TestContext) !void {
\\
);
- try ctx.addCompareOutput("function call with no args no return value", .ZIR,
+ ctx.addCompareOutput("function call with no args no return value", .ZIR,
\\@noreturn = primitive(noreturn)
\\@void = primitive(void)
\\@usize = primitive(usize)