Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Sources/Nimble/DSL+Wait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
line: UInt = #line,
column: UInt = #column,
action: @escaping (@escaping () -> Void) -> Void) {
return throwableUntil(timeout: timeout, file: file, line: line) { done in

Check warning on line 39 in Sources/Nimble/DSL+Wait.swift

View workflow job for this annotation

GitHub Actions / lint

Comma Spacing Violation: There should be no space before and one after any comma (comma)
action(done)
}
}
Expand Down Expand Up @@ -70,7 +70,7 @@
case let .errorThrown(error):
fail("Unexpected error thrown: \(error)",
fileID: fileID, file: file, line: line, column: column
) case .completed: // success

Check warning on line 73 in Sources/Nimble/DSL+Wait.swift

View workflow job for this annotation

GitHub Actions / lint

Switch and Case Statement Alignment Violation: Case statements should vertically aligned with their closing brace (switch_case_alignment)
break
}
}
Expand Down Expand Up @@ -105,7 +105,6 @@
/// 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.
@available(*, noasync, message: "the sync variant of `waitUntil` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `waitUntil` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func waitUntil(
timeout: NimbleTimeInterval = PollingDefaults.timeout,
fileID: String = #fileID,
Expand Down
7 changes: 0 additions & 7 deletions Sources/Nimble/Polling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ extension SyncExpectation {
/// This form of `toEventually` does not work in any kind of async context. Use the async form of `toEventually` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `toEventually` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `toEventually` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func toEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue)

Expand Down Expand Up @@ -206,7 +205,6 @@ extension SyncExpectation {
/// Use the async form of `toEventuallyNot` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `toEventuallyNot` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `toEventuallyNot` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func toEventuallyNot(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue)

Expand Down Expand Up @@ -242,7 +240,6 @@ extension SyncExpectation {
/// Use the async form of `toNotEventually` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `toNotEventually` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `toNotEventually` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func toNotEventually(_ matcher: Matcher<Value>, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description)
}
Expand All @@ -259,7 +256,6 @@ extension SyncExpectation {
/// Use the async form of `toNever` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `toNever` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `toNever` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func toNever(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue)

Expand Down Expand Up @@ -295,7 +291,6 @@ extension SyncExpectation {
/// Use the async form of `neverTo` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `neverTo` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `neverTo` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func neverTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
return toNever(matcher, until: until, pollInterval: pollInterval, description: description)
}
Expand All @@ -312,7 +307,6 @@ extension SyncExpectation {
/// Use the async form of `toAlways` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `toAlways` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `toAlways` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func toAlways(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue)

Expand Down Expand Up @@ -348,7 +342,6 @@ extension SyncExpectation {
/// Use the async form of `alwaysTo` if you are running tests in an async context.
@discardableResult
@available(*, noasync, message: "the sync variant of `alwaysTo` does not work in async contexts. Use the async variant as a drop-in replacement")
@available(*, deprecated, message: "the synchronous variant of `alwaysTo` will be unavailable from Swift in a future release of Nimble. Please use the asynchronous variant as a near drop-in replacement.")
public func alwaysTo(_ matcher: Matcher<Value>, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self {
return toAlways(matcher, until: until, pollInterval: pollInterval, description: description)
}
Expand Down
Loading