---
title: XCTExpectFailureWithOptions
framework: xctest
role: symbol
role_heading: Function
path: xctest/xctexpectfailurewithoptions
---

# XCTExpectFailureWithOptions

Instructs the test to expect a failure in an upcoming assertion, with options to customize expected failure checking and handling.

## Declaration

```occ
extern void XCTExpectFailureWithOptions(NSString *failureReason, XCTExpectedFailureOptions *options);
```

## See Also

### Expected Failures

- [XCTExpectedFailure](xctest/xctexpectedfailure.md)
- [XCTExpectedFailure.Options](xctest/xctexpectedfailure/options.md)
- [XCTExpectFailure](xctest/xctexpectfailure.md)
- [XCTExpectFailureInBlock](xctest/xctexpectfailureinblock.md)
- [XCTExpectFailureWithOptionsInBlock](xctest/xctexpectfailurewithoptionsinblock.md)
