Skip to content

Commit

Permalink
XCTAsyncUnwrap: @MainActor instead of @Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Aug 16, 2022
1 parent 1860a48 commit 45f7652
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/UnitTests/Misc/XCTestCase+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ extension XCTestCase {
}

/// Similar to `XCTUnrap` but it allows an `async` closure.
@MainActor
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.2, *)
func XCTAsyncUnwrap<T>(
_ expression: @autoclosure @Sendable () async throws -> T?,
_ message: @autoclosure @Sendable () -> String = "",
_ expression: @autoclosure () async throws -> T?,
_ message: @autoclosure () -> String = "",
file: StaticString = #filePath,
line: UInt = #line
) async throws -> T {
Expand Down

0 comments on commit 45f7652

Please sign in to comment.