Skip to content

Commit 32cfcf1

Browse files
committed
Guard the tests as well.
1 parent ff070d6 commit 32cfcf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TestFoundation/TestDateIntervalFormatter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class TestDateIntervalFormatter: XCTestCase {
101101
}
102102
}
103103

104-
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
104+
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS))
105105
func testStringFromDateToDateAcrossOneWeekWithMonthMinimization() {
106106
formatter.dateTemplate = "MMMd"
107107
formatter.boundaryStyle = .minimizeAdjacentMonths
@@ -134,7 +134,7 @@ class TestDateIntervalFormatter: XCTestCase {
134134
"Jan 1 – Mar 2")
135135
}
136136

137-
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
137+
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS))
138138
func testStringFromDateToDateAcrossSixtyDaysWithMonthMinimization() {
139139
formatter.dateTemplate = "MMMd"
140140
formatter.boundaryStyle = .minimizeAdjacentMonths
@@ -189,7 +189,7 @@ class TestDateIntervalFormatter: XCTestCase {
189189
("testStringFromDateToDateAcrossEighteenHours", testStringFromDateToDateAcrossEighteenHours),
190190
]
191191

192-
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
192+
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS))
193193
tests.append(contentsOf: [
194194
("testStringFromDateToDateAcrossOneWeekWithMonthMinimization", testStringFromDateToDateAcrossOneWeekWithMonthMinimization),
195195
("testStringFromDateToDateAcrossSixtyDaysWithMonthMinimization", testStringFromDateToDateAcrossSixtyDaysWithMonthMinimization),

0 commit comments

Comments
 (0)