Skip to content

Commit 4a35a90

Browse files
committed
Dont import CoreFoundation into unit tests if not needed.
1 parent f0f02b9 commit 4a35a90

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

TestFoundation/TestNSLock.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import SwiftFoundation
1515
import SwiftXCTest
1616
#endif
1717

18-
import CoreFoundation
19-
2018
class TestNSLock: XCTestCase {
2119
static var allTests: [(String, (TestNSLock) -> () throws -> Void)] {
2220
return [
@@ -32,7 +30,7 @@ class TestNSLock: XCTestCase {
3230
let condition = NSCondition()
3331
let lock = NSLock()
3432

35-
func test(waitTime: CFTimeInterval, shouldLock: Bool) -> Bool {
33+
func test(waitTime: TimeInterval, shouldLock: Bool) -> Bool {
3634
let locked = lock.lock(before: Date.init(timeIntervalSinceNow: waitTime))
3735
if locked {
3836
lock.unlock()

TestFoundation/TestThread.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
import SwiftXCTest
1717
#endif
1818

19-
import CoreFoundation
19+
#if !(os(OSX) || os(iOS))
20+
import CoreFoundation
21+
#endif
22+
2023

2124
class TestThread : XCTestCase {
2225
static var allTests: [(String, (TestThread) -> () throws -> Void)] {

0 commit comments

Comments
 (0)