diff --git a/Darwin/Foundation-swiftoverlay-Tests/TestCharacterSet.swift b/Darwin/Foundation-swiftoverlay-Tests/TestCharacterSet.swift index 32515a5e50..de86ef1b0c 100644 --- a/Darwin/Foundation-swiftoverlay-Tests/TestCharacterSet.swift +++ b/Darwin/Foundation-swiftoverlay-Tests/TestCharacterSet.swift @@ -269,7 +269,7 @@ class TestCharacterSet : XCTestCase { func test_setOperationsOfEmptySet() { // The following tests pass on these versions of the OS - if #available(OSX 10.12.3, iOS 10.3, watchOS 3.2, tvOS 10.2, *) { + if #available(macOS 10.12.3, iOS 10.3, watchOS 3.2, tvOS 10.2, *) { let emptySet = CharacterSet() let abcSet = CharacterSet(charactersIn: "abc") @@ -304,7 +304,7 @@ class TestCharacterSet : XCTestCase { /* Disabled now: rdar://problem/31746923 #if os(macOS) - if #available(OSX 10.12.4, iOS 10.3, watchOS 3.2, tvOS 10.2, *) { + if #available(macOS 10.12.4, iOS 10.3, watchOS 3.2, tvOS 10.2, *) { let abcSet = CharacterSet(charactersIn: "abc") let abcdSet = CharacterSet(charactersIn: "abcd") diff --git a/Darwin/Foundation-swiftoverlay-Tests/TestJSONEncoder.swift b/Darwin/Foundation-swiftoverlay-Tests/TestJSONEncoder.swift index dd7fc04f6e..874addec55 100644 --- a/Darwin/Foundation-swiftoverlay-Tests/TestJSONEncoder.swift +++ b/Darwin/Foundation-swiftoverlay-Tests/TestJSONEncoder.swift @@ -135,7 +135,7 @@ class TestJSONEncoder : XCTestCase { } let model = Model.testValue - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { let expectedJSON = "{\"top\":{\"first\":\"Johnny Appleseed\",\"second\":\"appleseed@apple.com\"}}".data(using: .utf8)! _testRoundTrip(of: model, expectedJSON: expectedJSON, outputFormatting: [.sortedKeys]) } else { @@ -178,7 +178,7 @@ class TestJSONEncoder : XCTestCase { let model = Model.testValue // This following test would fail as it attempts to re-encode into already encoded container is invalid. This will always fail expectCrashLater() - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { _testEncodeFailure(of: model) } else { _testEncodeFailure(of: model) @@ -200,7 +200,7 @@ class TestJSONEncoder : XCTestCase { } func testEncodingOutputFormattingSortedKeys() { - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { let expectedJSON = "{\"email\":\"appleseed@apple.com\",\"name\":\"Johnny Appleseed\"}".data(using: .utf8)! let person = Person.testValue _testRoundTrip(of: person, expectedJSON: expectedJSON, outputFormatting: [.sortedKeys]) @@ -208,7 +208,7 @@ class TestJSONEncoder : XCTestCase { } func testEncodingOutputFormattingPrettyPrintedSortedKeys() { - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { let expectedJSON = "{\n \"email\" : \"appleseed@apple.com\",\n \"name\" : \"Johnny Appleseed\"\n}".data(using: .utf8)! let person = Person.testValue _testRoundTrip(of: person, expectedJSON: expectedJSON, outputFormatting: [.prettyPrinted, .sortedKeys]) @@ -307,7 +307,7 @@ class TestJSONEncoder : XCTestCase { } func testEncodingDateISO8601() { - if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) { + if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) { let formatter = ISO8601DateFormatter() formatter.formatOptions = .withInternetDateTime diff --git a/Darwin/Foundation-swiftoverlay-Tests/TestPersonNameComponents.swift b/Darwin/Foundation-swiftoverlay-Tests/TestPersonNameComponents.swift index 4f270c7474..417ad5bb2e 100644 --- a/Darwin/Foundation-swiftoverlay-Tests/TestPersonNameComponents.swift +++ b/Darwin/Foundation-swiftoverlay-Tests/TestPersonNameComponents.swift @@ -55,7 +55,7 @@ class TestPersonNameComponents : XCTestCase { } func test_AnyHashableContainingPersonNameComponents() { - if #available(OSX 10.11, iOS 9.0, *) { + if #available(macOS 10.11, iOS 9.0, *) { let values: [PersonNameComponents] = [ makePersonNameComponents(givenName: "Kevin", familyName: "Frank"), makePersonNameComponents(givenName: "John", familyName: "Appleseed"), @@ -79,7 +79,7 @@ class TestPersonNameComponents : XCTestCase { } func test_AnyHashableCreatedFromNSPersonNameComponents() { - if #available(OSX 10.11, iOS 9.0, *) { + if #available(macOS 10.11, iOS 9.0, *) { let values: [NSPersonNameComponents] = [ makeNSPersonNameComponents(givenName: "Kevin", familyName: "Frank"), makeNSPersonNameComponents(givenName: "John", familyName: "Appleseed"), diff --git a/Darwin/Foundation-swiftoverlay-Tests/TestProgress.swift b/Darwin/Foundation-swiftoverlay-Tests/TestProgress.swift index b3e53ee02f..e15421c6e1 100644 --- a/Darwin/Foundation-swiftoverlay-Tests/TestProgress.swift +++ b/Darwin/Foundation-swiftoverlay-Tests/TestProgress.swift @@ -15,7 +15,7 @@ import XCTest class TestProgress : XCTestCase { func testUserInfoConveniences() { - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { let p = Progress(parent:nil, userInfo: nil) XCTAssertNil(p.userInfo[.throughputKey]) @@ -45,7 +45,7 @@ class TestProgress : XCTestCase { } func testPerformAsCurrent() { - if #available(OSX 10.11, iOS 8.0, *) { + if #available(macOS 10.11, iOS 8.0, *) { // This test can be enabled once is in the SDK /* let p = Progress.discreteProgress(totalUnitCount: 10) diff --git a/Darwin/Foundation-swiftoverlay-Tests/TestURL.swift b/Darwin/Foundation-swiftoverlay-Tests/TestURL.swift index fd3c433ff5..adcf128bc3 100644 --- a/Darwin/Foundation-swiftoverlay-Tests/TestURL.swift +++ b/Darwin/Foundation-swiftoverlay-Tests/TestURL.swift @@ -63,7 +63,7 @@ class TestURL : XCTestCase { #if os(macOS) func testQuarantineProperties() { // Test the quarantine stuff; it has special logic - if #available(OSX 10.11, iOS 9.0, *) { + if #available(macOS 10.11, iOS 9.0, *) { // Create a temporary file var file = URL(fileURLWithPath: NSTemporaryDirectory()) let name = "my_great_file" + UUID().uuidString @@ -179,13 +179,13 @@ class TestURL : XCTestCase { XCTAssertEqual("www.apple.com", components.host) - if #available(OSX 10.11, iOS 9.0, *) { + if #available(macOS 10.11, iOS 9.0, *) { let rangeOfHost = components.rangeOfHost! XCTAssertNotNil(rangeOfHost) XCTAssertEqual(s[rangeOfHost], "www.apple.com") } - if #available(OSX 10.10, iOS 8.0, *) { + if #available(macOS 10.10, iOS 8.0, *) { let qi = components.queryItems! XCTAssertNotNil(qi) @@ -197,7 +197,7 @@ class TestURL : XCTestCase { XCTAssertEqual("global|nav", first.value) } - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { components.percentEncodedQuery = "name1%E2%80%A2=value1%E2%80%A2&name2%E2%80%A2=value2%E2%80%A2" var qi = components.queryItems! XCTAssertNotNil(qi) @@ -349,7 +349,7 @@ class TestURL : XCTestCase { } func test_AnyHashableContainingURLQueryItem() { - if #available(OSX 10.10, iOS 8.0, *) { + if #available(macOS 10.10, iOS 8.0, *) { let values: [URLQueryItem] = [ URLQueryItem(name: "foo", value: nil), URLQueryItem(name: "bar", value: nil), @@ -365,7 +365,7 @@ class TestURL : XCTestCase { } func test_AnyHashableCreatedFromNSURLQueryItem() { - if #available(OSX 10.10, iOS 8.0, *) { + if #available(macOS 10.10, iOS 8.0, *) { let values: [NSURLQueryItem] = [ NSURLQueryItem(name: "foo", value: nil), NSURLQueryItem(name: "bar", value: nil), diff --git a/Darwin/Foundation-swiftoverlay/Data.swift b/Darwin/Foundation-swiftoverlay/Data.swift index d1a4386dcc..67570d3c0b 100644 --- a/Darwin/Foundation-swiftoverlay/Data.swift +++ b/Darwin/Foundation-swiftoverlay/Data.swift @@ -45,7 +45,7 @@ internal func __NSDataIsCompact(_ data: NSData) -> Bool { @_implementationOnly import _CoreFoundationOverlayShims internal func __NSDataIsCompact(_ data: NSData) -> Bool { - if #available(OSX 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { + if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { return data._isCompact() } else { var compact = true diff --git a/Darwin/Foundation-swiftoverlay/NSValue.swift b/Darwin/Foundation-swiftoverlay/NSValue.swift index ccb2e6049c..b979822ac6 100644 --- a/Darwin/Foundation-swiftoverlay/NSValue.swift +++ b/Darwin/Foundation-swiftoverlay/NSValue.swift @@ -25,7 +25,7 @@ extension NSRange: _ObjectiveCBridgeable { _getObjCTypeEncoding(NSRange.self)) == 0, "NSValue does not contain the right type to bridge to NSRange") result = NSRange() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -40,7 +40,7 @@ extension NSRange: _ObjectiveCBridgeable { return false } result = NSRange() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -55,7 +55,7 @@ extension NSRange: _ObjectiveCBridgeable { _getObjCTypeEncoding(NSRange.self)) == 0, "NSValue does not contain the right type to bridge to NSRange") var result = NSRange() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) @@ -77,7 +77,7 @@ extension CGRect: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGRect.self)) == 0, "NSValue does not contain the right type to bridge to CGRect") result = CGRect() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -92,7 +92,7 @@ extension CGRect: _ObjectiveCBridgeable { return false } result = CGRect() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -107,7 +107,7 @@ extension CGRect: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGRect.self)) == 0, "NSValue does not contain the right type to bridge to CGRect") var result = CGRect() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) @@ -129,7 +129,7 @@ extension CGPoint: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGPoint.self)) == 0, "NSValue does not contain the right type to bridge to CGPoint") result = CGPoint() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -144,7 +144,7 @@ extension CGPoint: _ObjectiveCBridgeable { return false } result = CGPoint() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -159,7 +159,7 @@ extension CGPoint: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGPoint.self)) == 0, "NSValue does not contain the right type to bridge to CGPoint") var result = CGPoint() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) @@ -181,7 +181,7 @@ extension CGVector: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGVector.self)) == 0, "NSValue does not contain the right type to bridge to CGVector") result = CGVector() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -196,7 +196,7 @@ extension CGVector: _ObjectiveCBridgeable { return false } result = CGVector() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -211,7 +211,7 @@ extension CGVector: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGVector.self)) == 0, "NSValue does not contain the right type to bridge to CGVector") var result = CGVector() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) @@ -233,7 +233,7 @@ extension CGSize: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGSize.self)) == 0, "NSValue does not contain the right type to bridge to CGSize") result = CGSize() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -248,7 +248,7 @@ extension CGSize: _ObjectiveCBridgeable { return false } result = CGSize() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -263,7 +263,7 @@ extension CGSize: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGSize.self)) == 0, "NSValue does not contain the right type to bridge to CGSize") var result = CGSize() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) @@ -285,7 +285,7 @@ extension CGAffineTransform: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGAffineTransform.self)) == 0, "NSValue does not contain the right type to bridge to CGAffineTransform") result = CGAffineTransform() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -300,7 +300,7 @@ extension CGAffineTransform: _ObjectiveCBridgeable { return false } result = CGAffineTransform() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { source.getValue(&result!, size: MemoryLayout.size) } else { source.getValue(&result!) @@ -315,7 +315,7 @@ extension CGAffineTransform: _ObjectiveCBridgeable { _getObjCTypeEncoding(CGAffineTransform.self)) == 0, "NSValue does not contain the right type to bridge to CGAffineTransform") var result = CGAffineTransform() - if #available(OSX 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { + if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) { unwrappedSource.getValue(&result, size: MemoryLayout.size) } else { unwrappedSource.getValue(&result) diff --git a/Sources/Foundation/Data.swift b/Sources/Foundation/Data.swift index a808240b33..609de09301 100644 --- a/Sources/Foundation/Data.swift +++ b/Sources/Foundation/Data.swift @@ -66,7 +66,7 @@ import _SwiftFoundationOverlayShims import _SwiftCoreFoundationOverlayShims internal func __NSDataIsCompact(_ data: NSData) -> Bool { - if #available(OSX 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { + if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { return data._isCompact() } else { var compact = true diff --git a/Sources/Foundation/FileManager+POSIX.swift b/Sources/Foundation/FileManager+POSIX.swift index a400abb830..a1fd75635e 100644 --- a/Sources/Foundation/FileManager+POSIX.swift +++ b/Sources/Foundation/FileManager+POSIX.swift @@ -49,7 +49,7 @@ extension FileManager { return urls } - if #available(OSX 10.13, *) { + if #available(macOS 10.13, *) { var statBufPtr: UnsafeMutablePointer? let fsCount = getmntinfo_r_np(&statBufPtr, MNT_WAIT) guard let statBuf = statBufPtr, fsCount > 0 else { diff --git a/Sources/Foundation/JSONEncoder.swift b/Sources/Foundation/JSONEncoder.swift index 37d8d1bcb6..4e38456503 100644 --- a/Sources/Foundation/JSONEncoder.swift +++ b/Sources/Foundation/JSONEncoder.swift @@ -1010,7 +1010,7 @@ extension JSONValue { } bytes.append(._closebracket) case .object(let dict): - if #available(OSX 10.13, *), options.contains(.sortedKeys) { + if #available(macOS 10.13, *), options.contains(.sortedKeys) { let sorted = dict.sorted { $0.key < $1.key } self.writeObject(sorted, into: &bytes) } else { @@ -1072,7 +1072,7 @@ extension JSONValue { self.addInset(to: &bytes, depth: depth) bytes.append(._closebracket) case .object(let dict): - if #available(OSX 10.13, *), options.contains(.sortedKeys) { + if #available(macOS 10.13, *), options.contains(.sortedKeys) { let sorted = dict.sorted { $0.key < $1.key } self.writePrettyObject(sorted, into: &bytes, depth: depth) } else { diff --git a/Tests/Foundation/Tests/TestJSONEncoder.swift b/Tests/Foundation/Tests/TestJSONEncoder.swift index d01eb24412..3fc3451898 100644 --- a/Tests/Foundation/Tests/TestJSONEncoder.swift +++ b/Tests/Foundation/Tests/TestJSONEncoder.swift @@ -130,7 +130,7 @@ class TestJSONEncoder : XCTestCase { _testRoundTrip(of: person, expectedJSON: expectedJSON, outputFormatting: [.prettyPrinted]) let encoder = JSONEncoder() - if #available(OSX 10.13, *) { + if #available(macOS 10.13, *) { encoder.outputFormatting = [.prettyPrinted, .sortedKeys] } else { // Fallback on earlier versions @@ -942,7 +942,7 @@ class TestJSONEncoder : XCTestCase { func test_OutputFormattingValues() { XCTAssertEqual(JSONEncoder.OutputFormatting.prettyPrinted.rawValue, 1) - if #available(OSX 10.13, *) { + if #available(macOS 10.13, *) { XCTAssertEqual(JSONEncoder.OutputFormatting.sortedKeys.rawValue, 2) } XCTAssertEqual(JSONEncoder.OutputFormatting.withoutEscapingSlashes.rawValue, 8) diff --git a/Tests/Foundation/Tests/TestNSTextCheckingResult.swift b/Tests/Foundation/Tests/TestNSTextCheckingResult.swift index bc4abf5395..f5d3293566 100644 --- a/Tests/Foundation/Tests/TestNSTextCheckingResult.swift +++ b/Tests/Foundation/Tests/TestNSTextCheckingResult.swift @@ -22,7 +22,7 @@ class TestNSTextCheckingResult: XCTestCase { XCTAssertEqual(result.range(at: 0).location, 6) XCTAssertEqual(result.range(at: 1).location, NSNotFound) XCTAssertEqual(result.range(at: 2).location, 6) - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { XCTAssertEqual(result.range(withName: "aname").location, 6) } //Negative offset @@ -30,7 +30,7 @@ class TestNSTextCheckingResult: XCTestCase { XCTAssertEqual(result.range(at: 0).location, 3) XCTAssertEqual(result.range(at: 1).location, NSNotFound) XCTAssertEqual(result.range(at: 2).location, 3) - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { XCTAssertEqual(result.range(withName: "aname").location, 3) } //ZeroOffset @@ -38,7 +38,7 @@ class TestNSTextCheckingResult: XCTestCase { XCTAssertEqual(result.range(at: 0).location, 5) XCTAssertEqual(result.range(at: 1).location, NSNotFound) XCTAssertEqual(result.range(at: 2).location, 5) - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { XCTAssertEqual(result.range(withName: "aname").location, 5) } } catch { @@ -59,14 +59,14 @@ class TestNSTextCheckingResult: XCTestCase { XCTAssertEqual(matches[0].range, NSRange(location: 0, length: 6)) XCTAssertEqual(matches[0].range(at: 0), NSRange(location: 0, length: 6)) XCTAssertEqual(matches[0].range(at: 1), NSRange(location: 0, length: 5)) - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { XCTAssertEqual(matches[0].range(withName: "name"), NSRange(location: 0, length: 5)) } XCTAssertEqual(matches[1].numberOfRanges, 2) XCTAssertEqual(matches[1].range, NSRange(location: 7, length: 6)) XCTAssertEqual(matches[1].range(at: 0), NSRange(location: 7, length: 6)) XCTAssertEqual(matches[1].range(at: 1), NSRange(location: 7, length: 5)) - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { + if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { XCTAssertEqual(matches[1].range(withName: "name"), NSRange(location: 7, length: 5)) } } catch { diff --git a/Tests/Foundation/Tests/TestProcess.swift b/Tests/Foundation/Tests/TestProcess.swift index e314be517d..710a2e05c8 100644 --- a/Tests/Foundation/Tests/TestProcess.swift +++ b/Tests/Foundation/Tests/TestProcess.swift @@ -12,7 +12,7 @@ class TestProcess : XCTestCase { func test_exit0() throws { let process = Process() let executableURL = xdgTestHelperURL() - if #available(OSX 10.13, *) { + if #available(macOS 10.13, *) { process.executableURL = executableURL } else { // Fallback on earlier versions