diff --git a/src/integration_tests.zig b/src/integration_tests.zig index 73406a80..03ba0377 100644 --- a/src/integration_tests.zig +++ b/src/integration_tests.zig @@ -159,7 +159,7 @@ pub fn main() void { pub fn cairo_run(allocator: std.mem.Allocator, pathname: []const u8, layout: []const u8, extensive_hints: bool) !void { var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; - const path = try std.os.realpath(pathname, &buffer); + const path = try std.posix.realpath(pathname, &buffer); var parsed_program = try ProgramJson.parseFromFile(allocator, path); defer parsed_program.deinit(); diff --git a/src/vm/cairo_run.zig b/src/vm/cairo_run.zig index bbe7224a..ad904999 100644 --- a/src/vm/cairo_run.zig +++ b/src/vm/cairo_run.zig @@ -111,7 +111,7 @@ test "EncodedMemory: can round trip from valid memory binary" { var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; // where `cairo_memory_struct` is sourced (graciously) from // https://github.com/lambdaclass/cairo-vm/blob/main/cairo_programs/trace_memory/cairo_trace_struct#L1 - const path = try std.os.realpath("cairo_programs/trace_memory/cairo_memory_struct", &buffer); + const path = try std.posix.realpath("cairo_programs/trace_memory/cairo_memory_struct", &buffer); const file = try std.fs.cwd().openFile(path, .{}); defer file.close(); diff --git a/src/vm/types/programjson.zig b/src/vm/types/programjson.zig index f0e54126..f8fa08f6 100644 --- a/src/vm/types/programjson.zig +++ b/src/vm/types/programjson.zig @@ -937,7 +937,7 @@ test "ProgramJson can be initialized from json file with correct program data" { // Parse the ProgramJson from the JSON file for testing. var parsed_program = try ProgramJson.parseFromFile( allocator, - try std.os.realpath("cairo_programs/fibonacci.json", &buffer), + try std.posix.realpath("cairo_programs/fibonacci.json", &buffer), ); defer parsed_program.deinit(); // Ensure deallocation after the test. @@ -1003,7 +1003,7 @@ test "ProgramJson: parseFromFile should return a parsed ProgramJson instance fro // Attempting to parse a ProgramJson instance from a JSON file var parsed_program = try ProgramJson.parseFromFile( std.testing.allocator, - try std.os.realpath( + try std.posix.realpath( "cairo_programs/manually_compiled/valid_program_a.json", &buffer, ), @@ -1037,7 +1037,7 @@ test "ProgramJson: parseFromFile should return a parsed ProgramJson instance fro // Attempting to parse a ProgramJson instance from a JSON file var parsed_program = try ProgramJson.parseFromFile( std.testing.allocator, - try std.os.realpath( + try std.posix.realpath( "cairo_programs/manually_compiled/valid_program_b.json", &buffer, ), @@ -1277,7 +1277,7 @@ test "ProgramJson: parseFromString should return a parsed ProgramJson instance f test "ProgramJson: parseProgramJson should parse a Cairo v0 JSON Program and convert it to a Program" { // Get the absolute path of the current working directory. var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; - const path = try std.os.realpath("cairo_programs/fibonacci.json", &buffer); + const path = try std.posix.realpath("cairo_programs/fibonacci.json", &buffer); // Parse the JSON file into a `ProgramJson` structure var parsed_program = try ProgramJson.parseFromFile(std.testing.allocator, path); defer parsed_program.deinit(); @@ -1382,7 +1382,7 @@ test "ProgramJson: parseProgramJson with missing entry point should return an er var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; // Obtain the real path of the JSON file - const path = try std.os.realpath( + const path = try std.posix.realpath( "cairo_programs/manually_compiled/valid_program_a.json", &buffer, ); @@ -1411,7 +1411,7 @@ test "ProgramJson: parseProgramJson should parse a valid manually compiled progr var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; // Obtain the real path of the JSON file - const path = try std.os.realpath( + const path = try std.posix.realpath( "cairo_programs/manually_compiled/valid_program_a.json", &buffer, ); @@ -1521,7 +1521,7 @@ test "ProgramJson: parseProgramJson should parse a valid manually compiled progr var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; // Obtain the real path of the JSON file - const path = try std.os.realpath( + const path = try std.posix.realpath( "cairo_programs/manually_compiled/valid_program_a.json", &buffer, ); @@ -1628,7 +1628,7 @@ test "ProgramJson: parseProgramJson with constant deserialization" { var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; // Obtain the real path of the JSON file. - const path = try std.os.realpath( + const path = try std.posix.realpath( "cairo_programs/manually_compiled/deserialize_constant_test.json", &buffer, ); @@ -2543,7 +2543,7 @@ test "ProgramJson should be able to parse a sample subset of cairo0 files" { errdefer std.debug.print("cannot parse program: {s}\n", .{program_path}); var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; - const path = try std.os.realpath(program_path, &buffer); + const path = try std.posix.realpath(program_path, &buffer); var parsed_program = try ProgramJson.parseFromFile(allocator, path); defer parsed_program.deinit(); }