diff options
| author | Loris Cro <kappaloris@gmail.com> | 2023-06-18 09:06:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-18 09:06:40 +0200 |
| commit | 216ef10dc471e4db60a30208be178d6c59efeaaf (patch) | |
| tree | 8c239dab283ae9cb3b7fe099bae240bcc53f894e /test/behavior/try.zig | |
| parent | 0fc1d396495c1ab482197021dedac8bea3f9401c (diff) | |
| parent | 729a051e9e38674233190aea23c0ac8c134f2d67 (diff) | |
| download | zig-216ef10dc471e4db60a30208be178d6c59efeaaf.tar.gz zig-216ef10dc471e4db60a30208be178d6c59efeaaf.zip | |
Merge branch 'master' into autodoc-searchkey
Diffstat (limited to 'test/behavior/try.zig')
| -rw-r--r-- | test/behavior/try.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/behavior/try.zig b/test/behavior/try.zig index 36428a4616..c7b0396051 100644 --- a/test/behavior/try.zig +++ b/test/behavior/try.zig @@ -4,9 +4,10 @@ const expect = std.testing.expect; test "try on error union" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try tryOnErrorUnionImpl(); - comptime try tryOnErrorUnionImpl(); + try comptime tryOnErrorUnionImpl(); } fn tryOnErrorUnionImpl() !void { @@ -23,6 +24,8 @@ fn returnsTen() anyerror!i32 { } test "try without vars" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); try expect(result1 == 2); @@ -39,6 +42,8 @@ fn failIfTrue(ok: bool) anyerror!void { } test "try then not executed with assignment" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + if (failIfTrue(true)) { unreachable; } else |err| { |
