Global Functionswift-testing 6.0.2Testing
__checkClosureCall(throws:performing:expression:comments:isRequired:isolation:sourceLocation:)
Check that an expression never throws an error.
ExpectationChecking+Macro.swift:917func __checkClosureCall(throws _: Never.Type, performing body: () async throws -> sending some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation) async -> Result<Void, any Error>
This overload is used for await #expect(throws: Never.self) { }
. It cannot be implemented directly in terms of the other overloads because it checks for the absence of an error rather than an error that matches some predicate.