diff options
Diffstat (limited to 'test/behavior/packed-struct.zig')
| -rw-r--r-- | test/behavior/packed-struct.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/behavior/packed-struct.zig b/test/behavior/packed-struct.zig index 5a6e92403b..037fee74ee 100644 --- a/test/behavior/packed-struct.zig +++ b/test/behavior/packed-struct.zig @@ -375,7 +375,7 @@ test "load pointer from packed struct" { } } -test "@ptrToInt on a packed struct field" { +test "@intFromPtr on a packed struct field" { if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; @@ -394,7 +394,7 @@ test "@ptrToInt on a packed struct field" { .z = 0, }; }; - try expect(@ptrToInt(&S.p0.z) - @ptrToInt(&S.p0.x) == 2); + try expect(@intFromPtr(&S.p0.z) - @intFromPtr(&S.p0.x) == 2); } test "optional pointer in packed struct" { |
