diff options
Diffstat (limited to 'test/behavior/error.zig')
| -rw-r--r-- | test/behavior/error.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig index c61cd70e6b..14b0eca030 100644 --- a/test/behavior/error.zig +++ b/test/behavior/error.zig @@ -16,8 +16,8 @@ fn expectError(expected_err: anyerror, observed_err_union: anytype) !void { } test "error values" { - const a = @errorToInt(error.err1); - const b = @errorToInt(error.err2); + const a = @intFromError(error.err1); + const b = @intFromError(error.err2); try expect(a != b); } @@ -259,14 +259,14 @@ fn testComptimeTestErrorEmptySet(x: EmptyErrorSet!i32) !void { } test "comptime err to int of error set with only 1 possible value" { - testErrToIntWithOnePossibleValue(error.A, @errorToInt(error.A)); - comptime testErrToIntWithOnePossibleValue(error.A, @errorToInt(error.A)); + testErrToIntWithOnePossibleValue(error.A, @intFromError(error.A)); + comptime testErrToIntWithOnePossibleValue(error.A, @intFromError(error.A)); } fn testErrToIntWithOnePossibleValue( x: error{A}, comptime value: u32, ) void { - if (@errorToInt(x) != value) { + if (@intFromError(x) != value) { @compileError("bad"); } } |
