Skip to content

Commit 95906ab

Browse files
committed
Adjusted usage of NSComparisonResult cases to Darwin API
1 parent 686a46f commit 95906ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Sources/XCTest/XCTestCase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ extension XCTestCase {
284284

285285
// Otherwise, wait another fraction of a second.
286286
runLoop.runUntilDate(NSDate(timeIntervalSinceNow: 0.01))
287-
} while NSDate().compare(timeoutDate) == NSComparisonResult.OrderedAscending
287+
} while NSDate().compare(timeoutDate) == NSComparisonResult.orderedAscending
288288

289289
if unfulfilledDescriptions.count > 0 {
290290
// Not all expectations were fulfilled. Append a failure

Tests/Functional/Asynchronous/Predicates/Expectations/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PredicateExpectationsTestCase: XCTestCase {
4141
let predicate = NSPredicate(block: {
4242
evaluatedObject, bindings in
4343
if let evaluatedDate = evaluatedObject as? NSDate {
44-
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedAscending
44+
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedAscending
4545
}
4646
return false
4747
})
@@ -55,7 +55,7 @@ class PredicateExpectationsTestCase: XCTestCase {
5555
let halfSecLaterDate = NSDate(timeIntervalSinceNow: 0.01)
5656
let predicate = NSPredicate(block: { evaluatedObject, bindings in
5757
if let evaluatedDate = evaluatedObject as? NSDate {
58-
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedDescending
58+
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedDescending
5959
}
6060
return false
6161
})

Tests/Functional/Asynchronous/Predicates/Handler/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class PredicateHandlerTestCase: XCTestCase {
4444
let halfSecLaterDate = NSDate(timeIntervalSinceNow: 0.2)
4545
let predicate = NSPredicate(block: { evaluatedObject, bindings in
4646
if let evaluatedDate = evaluatedObject as? NSDate {
47-
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedAscending
47+
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedAscending
4848
}
4949
return false
5050
})

0 commit comments

Comments
 (0)