diff --git a/tests/sessions.zig b/tests/sessions.zig index 9fbb41d..21c3c44 100644 --- a/tests/sessions.zig +++ b/tests/sessions.zig @@ -18,7 +18,7 @@ fn sendRequest(req: []const u8, process: *std.ChildProcess) !void { try process.stdin.?.writeAll(req); } -fn readResponses(process: *std.ChildProcess, expected_responses: var) !void { +fn readResponses(process: *std.ChildProcess, expected_responses: anytype) !void { var seen = std.mem.zeroes([expected_responses.len]bool); while (true) { const header = headerPkg.readRequestHeader(allocator, process.stdout.?.reader()) catch |err| { @@ -76,7 +76,7 @@ fn waitNoError(process: *std.ChildProcess) !void { return error.ShutdownWithError; } -fn consumeOutputAndWait(process: *std.ChildProcess, expected_responses: var) !void { +fn consumeOutputAndWait(process: *std.ChildProcess, expected_responses: anytype) !void { process.stdin.?.close(); process.stdin = null; try readResponses(process, expected_responses); diff --git a/tests/unit_tests.zig b/tests/unit_tests.zig index 926bba2..c7ab4c0 100644 --- a/tests/unit_tests.zig +++ b/tests/unit_tests.zig @@ -24,7 +24,7 @@ fn makeUnnamedDocument(text: []const u8) !types.TextDocument { return try makeDocument("test", text); } -fn testContext(comptime line: []const u8, comptime tag: var, comptime range: ?[]const u8) !void { +fn testContext(comptime line: []const u8, comptime tag: anytype, comptime range: ?[]const u8) !void { const cursor_idx = comptime std.mem.indexOf(u8, line, "").?; const final_line = line[0..cursor_idx] ++ line[cursor_idx + "".len ..];