Closed jiyimeta closed 7 months ago
Hi @jiyimeta, thanks for your interest in improving XCTest. Unfortunately we aren't accepting new APIs here on the swift-corelibs-xctest repository, because its primary purpose is to provide a compatible implementation of the APIs provided by the XCTest that ships with Xcode, for use when targeting platforms that Xcode doesn't support.
I recommend that you keep these additional APIs in your own project/package, and file an Xcode enhancement request at http://bugreport.apple.com.
Add
XCTAssertNoThrowAsync
andXCTAssertThrowsErrorAsync
, which are the async versions ofXCTAssertNoThrow
andXCTAssertThrowsError
.I adopted different names from sync ones in order to avoid confusion of overloads. For example, if the sync and async versions have the same name
XCTAssertThrowsError
,such a sync assertion in an async context will cause compile error with message
Expression is 'async' but is not marked with 'await'
, despite success before this change.Resolves #419.