Skip to content

Adjusted usage of NSComparisonResult cases to Darwin API #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2016
Merged
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
2 changes: 1 addition & 1 deletion Sources/XCTest/XCTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ extension XCTestCase {

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

if unfulfilledDescriptions.count > 0 {
// Not all expectations were fulfilled. Append a failure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PredicateExpectationsTestCase: XCTestCase {
let predicate = NSPredicate(block: {
evaluatedObject, bindings in
if let evaluatedDate = evaluatedObject as? NSDate {
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedAscending
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedAscending
}
return false
})
Expand All @@ -55,7 +55,7 @@ class PredicateExpectationsTestCase: XCTestCase {
let halfSecLaterDate = NSDate(timeIntervalSinceNow: 0.01)
let predicate = NSPredicate(block: { evaluatedObject, bindings in
if let evaluatedDate = evaluatedObject as? NSDate {
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedDescending
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedDescending
}
return false
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PredicateHandlerTestCase: XCTestCase {
let halfSecLaterDate = NSDate(timeIntervalSinceNow: 0.2)
let predicate = NSPredicate(block: { evaluatedObject, bindings in
if let evaluatedDate = evaluatedObject as? NSDate {
return evaluatedDate.compare(NSDate()) == NSComparisonResult.OrderedAscending
return evaluatedDate.compare(NSDate()) == NSComparisonResult.orderedAscending
}
return false
})
Expand Down