Type Method

wait(for:timeout:enforceOrder:)

Creates a waiter that waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

Declaration

class func wait(for expectations: [XCTestExpectation], timeout seconds: TimeInterval, enforceOrder enforceOrderOfFulfillment: Bool) -> XCTWaiter.Result

Parameters

expectations

The expectations to wait for.

seconds

The amount of time within which all expectations must be fulfilled.

enforceOrderOfFulfillment

Determines if expectations must be fulfilled in the order they appear in the expectations array.

Discussion

Expectations can appear in the expectations array only once. The waiter is discarded when the wait completes.

See Also

Waiting for Expectations

func wait(for: [XCTestExpectation], timeout: TimeInterval) -> XCTWaiter.Result

Waits on a group of expectations for up to the specified timeout.

func wait(for: [XCTestExpectation], timeout: TimeInterval, enforceOrder: Bool) -> XCTWaiter.Result

Waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

class func wait(for: [XCTestExpectation], timeout: TimeInterval) -> XCTWaiter.Result

Creates a waiter that waits on a group of expectations for up to the specified timeout.

enum XCTWaiter.Result

Result states returned by a waiter when it completes, times out, fails, or is interrupted.