Skip to content

Commit 96cb31e

Browse files
committed
DarwinCompatibility: Disable tests that use new API not yet in Foundation
1 parent ca6eca0 commit 96cb31e

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

Diff for: TestFoundation/TestFileHandle.swift

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10+
#if !DARWIN_COMPATIBILITY_TESTS // Disable until Foundation has the new FileHandle API
11+
1012
import Dispatch
1113

1214
class TestFileHandle : XCTestCase {
@@ -484,3 +486,5 @@ class TestFileHandle : XCTestCase {
484486
]
485487
}
486488
}
489+
490+
#endif

Diff for: TestFoundation/TestNSCalendar.swift

+2
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ class TestNSCalendar: XCTestCase {
751751
}
752752

753753
func test_rangeOfWeekendStartDate_interval_containingDate() throws {
754+
#if !DARWIN_COMPATIBILITY_TESTS // NSCalender range(ofWeekendContaining:) is experimental
754755
try enumerateTestWeekends() { (calendar, interval) in
755756
let startDateResult = calendar.range(ofWeekendContaining: interval.start)
756757
XCTAssertEqual(startDateResult, interval)
@@ -764,6 +765,7 @@ class TestNSCalendar: XCTestCase {
764765
let oneSecondBeforeEndResult = calendar.range(ofWeekendContaining: interval.end - 1)
765766
XCTAssertEqual(oneSecondBeforeEndResult, interval)
766767
}
768+
#endif
767769
}
768770

769771
func test_enumerateDatesStartingAfterDate_chineseEra_matchYearOne() throws {

Diff for: TestFoundation/TestPipe.swift

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10+
#if !DARWIN_COMPATIBILITY_TESTS // Disable until Foundation has the new FileHandle API
1011
class TestPipe: XCTestCase {
1112

1213
static var allTests: [(String, (TestPipe) -> () throws -> Void)] {
@@ -57,3 +58,4 @@ class TestPipe: XCTestCase {
5758
XCTAssertEqual(text, convertedData)
5859
}
5960
}
61+
#endif

Diff for: TestFoundation/TestScanner.swift

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10+
#if !DARWIN_COMPATIBILITY_TESTS // Disable until Foundation has the new Scanner API
11+
1012
fileprivate func withScanner(for string: String, invoking block: ((Scanner) throws -> Void)? = nil) rethrows {
1113
let scanner = Scanner(string: string)
1214
scanner.locale = Locale(identifier: "en_US_POSIX")
@@ -481,3 +483,5 @@ class TestScanner : XCTestCase {
481483
]
482484
}
483485
}
486+
487+
#endif

0 commit comments

Comments
 (0)