diff options
| author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-05 14:29:28 +0600 |
|---|---|---|
| committer | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-13 23:46:58 +0600 |
| commit | d884d7050e061c620324aaaabfba507e08cb40f4 (patch) | |
| tree | fa0b5994341509ef81d7244788ea3e37b13f6d27 /test/behavior/error.zig | |
| parent | 6078781ae52fc2c85559f622f58c303b73d8a6a5 (diff) | |
| download | zig-d884d7050e061c620324aaaabfba507e08cb40f4.tar.gz zig-d884d7050e061c620324aaaabfba507e08cb40f4.zip | |
all: replace `comptime try` with `try comptime`
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'test/behavior/error.zig')
| -rw-r--r-- | test/behavior/error.zig | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig index b8f68ec663..c61cd70e6b 100644 --- a/test/behavior/error.zig +++ b/test/behavior/error.zig @@ -188,7 +188,7 @@ fn bar2() (error{}!void) {} test "error union type " { try testErrorUnionType(); - comptime try testErrorUnionType(); + try comptime testErrorUnionType(); } fn testErrorUnionType() !void { @@ -201,7 +201,7 @@ fn testErrorUnionType() !void { test "error set type" { try testErrorSetType(); - comptime try testErrorSetType(); + try comptime testErrorSetType(); } const MyErrSet = error{ @@ -227,7 +227,7 @@ test "explicit error set cast" { if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try testExplicitErrorSetCast(Set1.A); - comptime try testExplicitErrorSetCast(Set1.A); + try comptime testExplicitErrorSetCast(Set1.A); } const Set1 = error{ A, B }; @@ -246,7 +246,7 @@ test "comptime test error for empty error set" { if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try testComptimeTestErrorEmptySet(1234); - comptime try testComptimeTestErrorEmptySet(1234); + try comptime testComptimeTestErrorEmptySet(1234); } const EmptyErrorSet = error{}; @@ -337,7 +337,7 @@ test "error: Zero sized error set returned with value payload crash" { if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; _ = try foo3(0); - _ = comptime try foo3(0); + _ = try comptime foo3(0); } const Error = error{}; @@ -446,7 +446,7 @@ test "return function call to error set from error union function" { } }; try expectError(error.Failure, S.errorable()); - comptime try expectError(error.Failure, S.errorable()); + try comptime expectError(error.Failure, S.errorable()); } test "optional error set is the same size as error set" { @@ -455,15 +455,15 @@ test "optional error set is the same size as error set" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; - comptime try expect(@sizeOf(?anyerror) == @sizeOf(anyerror)); - comptime try expect(@alignOf(?anyerror) == @alignOf(anyerror)); + try comptime expect(@sizeOf(?anyerror) == @sizeOf(anyerror)); + try comptime expect(@alignOf(?anyerror) == @alignOf(anyerror)); const S = struct { fn returnsOptErrSet() ?anyerror { return null; } }; try expect(S.returnsOptErrSet() == null); - comptime try expect(S.returnsOptErrSet() == null); + try comptime expect(S.returnsOptErrSet() == null); } test "nested catch" { @@ -489,7 +489,7 @@ test "nested catch" { }; }; try S.entry(); - comptime try S.entry(); + try comptime S.entry(); } test "function pointer with return type that is error union with payload which is pointer of parent struct" { @@ -545,7 +545,7 @@ test "return result loc as peer result loc in inferred error set function" { } }; try S.doTheTest(); - comptime try S.doTheTest(); + try comptime S.doTheTest(); } test "error payload type is correctly resolved" { |
