From 42f999079a3397430493fa4444db84c95c889ca2 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 12 Jun 2022 11:23:23 -0700 Subject: [PATCH] Tests: explicitly construct `FilePath` The literal value needs to be converted on different platform. Explicitly construct the type rather than trying to change the literal to the platform character type. --- Tests/SystemTests/FileOperationsTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/SystemTests/FileOperationsTest.swift b/Tests/SystemTests/FileOperationsTest.swift index 419e1c97..723d0312 100644 --- a/Tests/SystemTests/FileOperationsTest.swift +++ b/Tests/SystemTests/FileOperationsTest.swift @@ -163,7 +163,7 @@ final class FileOperationsTest: XCTestCase { #if !os(Windows) func testResizeFile() throws { - let fd = try FileDescriptor.open("/tmp/\(UUID().uuidString).txt", .readWrite, options: [.create, .truncate], permissions: .ownerReadWrite) + let fd = try FileDescriptor.open(FilePath("/tmp/\(UUID().uuidString).txt"), .readWrite, options: [.create, .truncate], permissions: .ownerReadWrite) try fd.closeAfter { // File should be empty initially. XCTAssertEqual(try fd.fileSize(), 0)