Skip to content

Commit d69a6e5

Browse files
Rodrigo Kreutzikesyo
authored andcommitted
Adding Quick help docs
1 parent 26a9795 commit d69a6e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Sources/Nimble/Matchers/Async.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ extension Expectation {
151151
return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description)
152152
}
153153

154+
/// Tests the actual value using a matcher to never match by checking
155+
/// continuously at each pollInterval until the timeout is reached.
156+
///
157+
/// @discussion
158+
/// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function
159+
/// is executing. Any attempts to touch the run loop may cause non-deterministic behavior.
154160
public func toNever(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) {
155161
nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue)
156162

@@ -166,6 +172,14 @@ extension Expectation {
166172
verify(pass, msg)
167173
}
168174

175+
/// Tests the actual value using a matcher to never match by checking
176+
/// continuously at each pollInterval until the timeout is reached.
177+
///
178+
/// Alias of toNever()
179+
///
180+
/// @discussion
181+
/// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function
182+
/// is executing. Any attempts to touch the run loop may cause non-deterministic behavior.
169183
public func neverTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) {
170184
return toNever(predicate, until: until, pollInterval: pollInterval, description: description)
171185
}

0 commit comments

Comments
 (0)