Skip to content
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

Bump MACOSX_DEPLOYMENT_TARGET to 10.10 #526

Merged
merged 1 commit into from
May 24, 2018
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
4 changes: 2 additions & 2 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
METAL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1899,7 +1899,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.10;
METAL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
8 changes: 1 addition & 7 deletions Sources/Nimble/Adapters/NimbleEnvironment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ internal class NimbleEnvironment {
var awaiter: Awaiter

init() {
let timeoutQueue: DispatchQueue
if #available(OSX 10.10, *) {
timeoutQueue = DispatchQueue.global(qos: .userInitiated)
} else {
timeoutQueue = DispatchQueue.global(priority: .high)
}

let timeoutQueue = DispatchQueue.global(qos: .userInitiated)
awaiter = Awaiter(
waitLock: AssertionWaitLock(),
asyncQueue: .main,
Expand Down
30 changes: 5 additions & 25 deletions Tests/NimbleTests/AsynchronousTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,12 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {

var asyncOperation: () -> Void = { sleepThenSetValueTo(1) }

if #available(OSX 10.10, *) {
DispatchQueue.global().async(execute: asyncOperation)
} else {
DispatchQueue.global(priority: .default).async(execute: asyncOperation)
}
DispatchQueue.global().async(execute: asyncOperation)
expect { value }.toEventually(equal(1))

asyncOperation = { sleepThenSetValueTo(0) }

if #available(OSX 10.10, *) {
DispatchQueue.global().async(execute: asyncOperation)
} else {
DispatchQueue.global(priority: .default).async(execute: asyncOperation)
}
DispatchQueue.global().async(execute: asyncOperation)
expect { value }.toEventuallyNot(equal(1))
}

Expand Down Expand Up @@ -105,11 +97,7 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {
done()
waiting = false
}
if #available(OSX 10.10, *) {
DispatchQueue.global().async(execute: asyncOperation)
} else {
DispatchQueue.global(priority: .default).async(execute: asyncOperation)
}
DispatchQueue.global().async(execute: asyncOperation)
}
}

Expand Down Expand Up @@ -185,11 +173,7 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {
}.to(raiseException(named: "InvalidNimbleAPIUsage"))
executedAsyncBlock = true
}
if #available(OSX 10.10, *) {
DispatchQueue.global().async(execute: asyncOperation)
} else {
DispatchQueue.global(priority: .default).async(execute: asyncOperation)
}
DispatchQueue.global().async(execute: asyncOperation)
expect(executedAsyncBlock).toEventually(beTruthy())
#endif
}
Expand All @@ -203,11 +187,7 @@ final class AsyncTest: XCTestCase, XCTestCaseProvider {
}.to(raiseException(named: "InvalidNimbleAPIUsage"))
executedAsyncBlock = true
}
if #available(OSX 10.10, *) {
DispatchQueue.global().async(execute: asyncOperation)
} else {
DispatchQueue.global(priority: .default).async(execute: asyncOperation)
}
DispatchQueue.global().async(execute: asyncOperation)
expect(executedAsyncBlock).toEventually(beTruthy())
#endif
}
Expand Down