aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/async_fn.zig
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2023-06-15 13:14:16 +0600
committerAndrew Kelley <andrew@ziglang.org>2023-06-19 12:34:42 -0700
commit50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc (patch)
tree9e2b95d8e111e905e00511962dfd32c8e5bb3245 /test/behavior/async_fn.zig
parenta6c8ee5231230947c928bbe1c6a39eb6e1bb9c5b (diff)
downloadzig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.tar.gz
zig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.zip
all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'test/behavior/async_fn.zig')
-rw-r--r--test/behavior/async_fn.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/behavior/async_fn.zig b/test/behavior/async_fn.zig
index 54609ac298..dcbe78b091 100644
--- a/test/behavior/async_fn.zig
+++ b/test/behavior/async_fn.zig
@@ -829,7 +829,7 @@ test "alignment of local variables in async functions" {
var y: u8 = 123;
_ = y;
var x: u8 align(128) = 1;
- try expect(@ptrToInt(&x) % 128 == 0);
+ try expect(@intFromPtr(&x) % 128 == 0);
}
};
try S.doTheTest();
@@ -1184,7 +1184,7 @@ test "using @TypeOf on a generic function call" {
global_frame = @frame();
}
const F = @TypeOf(async amain(x - 1));
- const frame = @intToPtr(*F, @ptrToInt(&buf));
+ const frame = @ptrFromInt(*F, @intFromPtr(&buf));
return await @asyncCall(frame, {}, amain, .{x - 1});
}
};
@@ -1212,7 +1212,7 @@ test "recursive call of await @asyncCall with struct return type" {
global_frame = @frame();
}
const F = @TypeOf(async amain(x - 1));
- const frame = @intToPtr(*F, @ptrToInt(&buf));
+ const frame = @ptrFromInt(*F, @intFromPtr(&buf));
return await @asyncCall(frame, {}, amain, .{x - 1});
}