XCTExpectFailure(_:options:)
Instructs the test to expect a failure in an upcoming assertion, with options to customize expected failure checking and handling.
Declaration
func XCTExpectFailure(_ failureReason: String? = nil, options: XCTExpectedFailure.Options = .init())Parameters
- failureReason:
An optional string that describes why the test expects a failure.
- options:
Options that determine how the test matches the expected failure to an actual test failure, and whether an unfulfilled expected failure results in a test failure.