Skip to content

Commit 64b4a79

Browse files
committed
Fix XCTAssertThrowsError method signature
1 parent 732d953 commit 64b4a79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/XCTest/Public/XCTAssert.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public func XCTFail(_ message: String = "", file: StaticString = #file, line: UI
306306
}
307307
}
308308

309-
public func XCTAssertThrowsError<T>(_ expression: @autoclosure () throws -> T, _ message: String = "", file: StaticString = #file, line: UInt = #line, _ errorHandler: (_ error: Swift.Error) -> Void = { _ in }) {
309+
public func XCTAssertThrowsError<T>(_ expression: @autoclosure () throws -> T, _ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line, _ errorHandler: (_ error: Swift.Error) -> Void = { _ in }) {
310310
_XCTEvaluateAssertion(.throwsError, message: message, file: file, line: line) {
311311
var caughtErrorOptional: Swift.Error?
312312
do {

0 commit comments

Comments
 (0)