Skip to content

Commit

Permalink
Merge pull request Quick#526 from Quick/bump-macos-requirement
Browse files Browse the repository at this point in the history
Bump MACOSX_DEPLOYMENT_TARGET to 10.10
  • Loading branch information
ikesyo authored May 24, 2018
2 parents 815f1e6 + bd35f30 commit ce8765c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 34 deletions.
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

0 comments on commit ce8765c

Please sign in to comment.