Asserts that an expression is not
nil and returns the unwrapped value.
- Xcode 11.0+
An expression of type
T?. The expression’s type determines the type of the return value.
An optional description of the failure.
The file in which the failure occurred. The default is the file name of the test case in which this function was called.
The line number on which the failure occurred. The default is the line number on which this function was called.
The result of evaluating and unwrapping the given
expression, which is of type
XCTUnwrap() only returns a value if
expression is not
This function generates a failure when
nil. Otherwise, it returns the unwrapped value of
expression for subsequent use in the test.