summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/macos.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/macos.zig b/runtime/macos.zig
index 88eab2bb..23d70b27 100644
--- a/runtime/macos.zig
+++ b/runtime/macos.zig
@@ -2112,7 +2112,7 @@ test "mac worker setup failures finish matching LSP and pipe requests" {
const req: host_io.Lsp.Request = .{
.id = core.lsp_ask.wait.?.id,
.kind = .status,
- .pane = @intCast(core.view().active),
+ .pane = .at(core.view().active),
.offset = 0,
.arg = "",
};
@@ -2266,8 +2266,8 @@ test "mac Restore keeps host state and rejects callbacks from the old core" {
.failure = .{ .kind = .exit, .code = 1, .stderr = try gpa.dupe(u8, "old filter failure") },
} });
}
- st.inbox.acceptReader(0, 23);
- _ = st.inbox.pushOutput(0, 23, try gpa.dupe(u8, "old PTY output"));
+ st.inbox.acceptReader(.at(0), 23);
+ _ = st.inbox.pushOutput(.at(0), 23, try gpa.dupe(u8, "old PTY output"));
core.update(.{ .command = try std.fmt.bufPrint(&command, "Restore .zig-cache/tmp/{s}/restore.zon", .{tmp.sub_path}) });
try std.testing.expect(restoreCore(&st));
try std.testing.expect(st.core != core);
@@ -2337,8 +2337,8 @@ test "mac Restore cancels a PTY reader waiting for output capacity" {
try dump.dumpState(st.core);
try tmp.dir.writeFile(io, .{ .sub_path = "restore.zon", .data = st.core.dump_out.? });
while (st.core.nextEffect()) |_| {}
- st.inbox.acceptReader(1, 1);
- for (0..Inbox.output_capacity) |_| _ = st.inbox.pushOutput(1, 1, try gpa.dupe(u8, "retained output"));
+ st.inbox.acceptReader(.at(1), 1);
+ for (0..Inbox.output_capacity) |_| _ = st.inbox.pushOutput(.at(1), 1, try gpa.dupe(u8, "retained output"));
const child = try host_io.forkShell(null, 0, &st.prompt_rcs, "/bin/sh", "", 12, 40);
st.gens[0] = 1;
st.ptys[0] = .{ .file = child.file, .pid = child.pid, .gen = 1, .reader = .{ .any_future = null, .result = {} } };
@@ -2362,8 +2362,8 @@ test "mac Restore cancels a PTY reader waiting for output capacity" {
try std.testing.expect(st.ptys[0] == null);
try std.testing.expectEqual(@as(usize, 0), st.inbox.len);
try std.testing.expectEqual(@as(u16, 0), st.inbox.space.state.load(.acquire).waiters);
- st.inbox.acceptReader(0, st.gens[0]);
- _ = st.inbox.pushOutput(0, st.gens[0], try gpa.dupe(u8, "fresh output"));
+ st.inbox.acceptReader(.at(0), st.gens[0]);
+ _ = st.inbox.pushOutput(.at(0), st.gens[0], try gpa.dupe(u8, "fresh output"));
var batch = st.inbox.take();
defer for (batch.slice()) |msg| msg.deinit(gpa, gpa);
try std.testing.expectEqual(@as(usize, 1), batch.len);