Skip to content

Commit

Permalink
Add missing availability guards in tests (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjbeaumont authored Dec 15, 2023
1 parent 6717fd0 commit 363da63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ fileprivate func withTemporaryFile<T>(content: String? = nil, _ body: (NIOCore.N
return try body(fileHandle, temporaryFilePath)
}

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
fileprivate func withTemporaryFile<T>(content: String? = nil, _ body: (NIOCore.NIOFileHandle, String) async throws -> T) async throws -> T {
let temporaryFilePath = "\(temporaryDirectory)/nio_extras_\(UUID())"
FileManager.default.createFile(atPath: temporaryFilePath, contents: content?.data(using: .utf8))
Expand Down

0 comments on commit 363da63

Please sign in to comment.