pub unsafe trait XCTWaiterDelegate: NSObjectProtocol {
// Provided methods
fn waiter_didTimeoutWithUnfulfilledExpectations(
&self,
waiter: &XCTWaiter,
unfulfilled_expectations: &NSArray<XCTestExpectation>,
)
where Self: Sized + Message { ... }
fn waiter_fulfillmentDidViolateOrderingConstraintsForExpectation_requiredExpectation(
&self,
waiter: &XCTWaiter,
expectation: &XCTestExpectation,
required_expectation: &XCTestExpectation,
)
where Self: Sized + Message { ... }
fn waiter_didFulfillInvertedExpectation(
&self,
waiter: &XCTWaiter,
expectation: &XCTestExpectation,
)
where Self: Sized + Message { ... }
fn nestedWaiter_wasInterruptedByTimedOutWaiter(
&self,
waiter: &XCTWaiter,
outer_waiter: &XCTWaiter,
)
where Self: Sized + Message { ... }
}Expand description
Events are reported to the waiter’s delegate via these methods. XCTestCase conforms to the delegate protocol and will automatically report timeouts and other unexpected events as test failures.
Note: These methods are invoked on an arbitrary queue.
See also Apple’s documentation
Provided Methods§
Sourcefn waiter_didTimeoutWithUnfulfilledExpectations(
&self,
waiter: &XCTWaiter,
unfulfilled_expectations: &NSArray<XCTestExpectation>,
)
fn waiter_didTimeoutWithUnfulfilledExpectations( &self, waiter: &XCTWaiter, unfulfilled_expectations: &NSArray<XCTestExpectation>, )
Invoked when not all waited on expectations are fulfilled during the timeout period. If the delegate is an XCTestCase instance, this will be reported as a test failure.
Sourcefn waiter_fulfillmentDidViolateOrderingConstraintsForExpectation_requiredExpectation(
&self,
waiter: &XCTWaiter,
expectation: &XCTestExpectation,
required_expectation: &XCTestExpectation,
)
fn waiter_fulfillmentDidViolateOrderingConstraintsForExpectation_requiredExpectation( &self, waiter: &XCTWaiter, expectation: &XCTestExpectation, required_expectation: &XCTestExpectation, )
Invoked when the -wait call has specified that fulfillment order should be enforced and an expectation has been fulfilled in the wrong order. If the delegate is an XCTestCase instance, this will be reported as a test failure.
Sourcefn waiter_didFulfillInvertedExpectation(
&self,
waiter: &XCTWaiter,
expectation: &XCTestExpectation,
)
fn waiter_didFulfillInvertedExpectation( &self, waiter: &XCTWaiter, expectation: &XCTestExpectation, )
Invoked when an expectation marked as inverted (/see inverted) is fulfilled. If the delegate is an XCTestCase instance, this will be reported as a test failure.
Sourcefn nestedWaiter_wasInterruptedByTimedOutWaiter(
&self,
waiter: &XCTWaiter,
outer_waiter: &XCTWaiter,
)
fn nestedWaiter_wasInterruptedByTimedOutWaiter( &self, waiter: &XCTWaiter, outer_waiter: &XCTWaiter, )
Invoked when the waiter is interrupted prior to its expectations being fulfilled or timing out. This occurs when an “outer” waiter times out, resulting in any waiters nested inside it being interrupted to allow the call stack to quickly unwind.