SyncRequirement
public struct SyncRequirement<Value>
Undocumented
-
Undocumented
Declaration
Swift
public let expression: Expression<Value>
-
A custom error to throw. If nil, then we will throw a
RequireError
on failure.Declaration
Swift
public let customError: Error?
-
Undocumented
Declaration
Swift
public var location: SourceLocation { get }
-
Undocumented
Declaration
Swift
public init(expression: Expression<Value>, customError: Error?)
-
Undocumented
Declaration
Swift
public func verify(_ pass: Bool, _ message: FailureMessage, _ value: Value?) throws -> Value
-
Tests the actual value using a matcher to match.
Declaration
Swift
@discardableResult public func to(_ matcher: Matcher<Value>, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to not match.
Declaration
Swift
@discardableResult public func toNot(_ matcher: Matcher<Value>, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to not match.
Alias to toNot().
Declaration
Swift
@discardableResult public func notTo(_ matcher: Matcher<Value>, description: String? = nil) throws -> Value
-
to(_:
Asynchronousdescription: ) Tests the actual value using a matcher to match.
Declaration
Swift
@discardableResult public func to(_ matcher: AsyncMatcher<Value>, description: String? = nil) async throws -> Value
-
toNot(_:
Asynchronousdescription: ) Tests the actual value using a matcher to not match.
Declaration
Swift
@discardableResult public func toNot(_ matcher: AsyncMatcher<Value>, description: String? = nil) async throws -> Value
-
notTo(_:
Asynchronousdescription: ) Tests the actual value using a matcher to not match.
Alias to toNot().
Declaration
Swift
@discardableResult public func notTo(_ matcher: AsyncMatcher<Value>, description: String? = nil) async throws -> Value
-
Require the actual value using a matcher to match by checking continuously at each pollInterval until the timeout is reached.
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
toEventually
does not work in any kind of async context. Use the async form oftoEventually
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `toEventually` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func toEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
toEventuallyNot
does not work in any kind of async context. Use the async form oftoEventuallyNot
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `toEventuallyNot` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func toEventuallyNot(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
Alias of toEventuallyNot()
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
toNotEventually
does not work in any kind of async context. Use the async form oftoNotEventually
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `toNotEventually` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func toNotEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
toNever
does not work in any kind of async context. Use the async form oftoNever
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `toNever` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func toNever(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
Alias of toNever()
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
neverTo
does not work in any kind of async context. Use the async form ofneverTo
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `neverTo` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func neverTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
toAlways
does not work in any kind of async context. Use the async form oftoAlways
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `toAlways` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func toAlways(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
Alias of toAlways()
@discussion This function manages the main run loop (
NSRunLoop.mainRunLoop()
) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.@warning This form of
alwaysTo
does not work in any kind of async context. Use the async form ofalwaysTo
if you are running tests in an async context.Declaration
Swift
@available(*, noasync, message: "the sync variant of `alwaysTo` does not work in async contexts. Use the async variant as a drop-in replacement") @discardableResult public func alwaysTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value
-
toEventually(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toEventuallyNot(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toEventuallyNot(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toNotEventually(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
Alias of toEventuallyNot()
Declaration
Swift
@discardableResult public func toNotEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toNever(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toNever(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
neverTo(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
Alias of toNever()
Declaration
Swift
@discardableResult public func neverTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toAlways(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
Declaration
Swift
@discardableResult public func toAlways(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
alwaysTo(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
Alias of toAlways()
Declaration
Swift
@discardableResult public func alwaysTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toEventually(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toEventually(_ matcher: AsyncMatcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toEventuallyNot(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toEventuallyNot(_ matcher: AsyncMatcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toNotEventually(_:
Asynchronoustimeout: pollInterval: description: ) Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.
Alias of toEventuallyNot()
Declaration
Swift
@discardableResult public func toNotEventually(_ matcher: AsyncMatcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toNever(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
Declaration
Swift
@discardableResult public func toNever(_ matcher: AsyncMatcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
neverTo(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.
Alias of toNever()
Declaration
Swift
@discardableResult public func neverTo(_ matcher: AsyncMatcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
toAlways(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
Declaration
Swift
@discardableResult public func toAlways(_ matcher: AsyncMatcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value
-
alwaysTo(_:
Asynchronousuntil: pollInterval: description: ) Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached
Alias of toAlways()
Declaration
Swift
@discardableResult public func alwaysTo(_ matcher: AsyncMatcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value