---
title: XCTExpectFailureWithOptionsInBlock
framework: xctest
role: symbol
role_heading: Function
path: xctest/xctexpectfailurewithoptionsinblock
---

# XCTExpectFailureWithOptionsInBlock

Instructs the test to expect a failure in an assertion in the provided block of code, with options to customize expected failure checking and handling.

## Declaration

```occ
extern void XCTExpectFailureWithOptionsInBlock(NSString *failureReason, XCTExpectedFailureOptions *options, void (^failingBlock)());
```

## See Also

### Expected Failures

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