Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: explicitly construct FilePath #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

compnerd
Copy link
Collaborator

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.

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.
@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. This feels like it indicates an API bug.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string-taking version should either be disfavored or updated to construct a file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants