Skip to content

Commit ef6b5dd

Browse files
committed
[APIDiff] Enable tests on non-Darwin
1 parent b0e0388 commit ef6b5dd

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

Tests/CommandsTests/APIDiffTests.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ final class APIDiffTests: XCTestCase {
2828
}
2929

3030
func testSimpleAPIDiff() throws {
31-
#if os(macOS)
3231
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
3332
throw XCTSkip("swift-api-digester not available")
3433
}
@@ -47,13 +46,9 @@ final class APIDiffTests: XCTestCase {
4746
XCTAssertTrue(output.contains("💔 API breakage: func foo() has been removed"))
4847
}
4948
}
50-
#else
51-
throw XCTSkip("Test unsupported on current platform")
52-
#endif
5349
}
5450

5551
func testMultiTargetAPIDiff() throws {
56-
#if os(macOS)
5752
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
5853
throw XCTSkip("swift-api-digester not available")
5954
}
@@ -77,13 +72,9 @@ final class APIDiffTests: XCTestCase {
7772
XCTAssertTrue(output.contains("💔 API breakage: func bar() has been removed"))
7873
}
7974
}
80-
#else
81-
throw XCTSkip("Test unsupported on current platform")
82-
#endif
8375
}
8476

8577
func testCheckVendedModulesOnly() throws {
86-
#if os(macOS)
8778
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
8879
throw XCTSkip("swift-api-digester not available")
8980
}
@@ -119,13 +110,9 @@ final class APIDiffTests: XCTestCase {
119110
XCTAssertFalse(output.contains("💔 API breakage: var Qux.x has been removed"))
120111
}
121112
}
122-
#else
123-
throw XCTSkip("Test unsupported on current platform")
124-
#endif
125113
}
126114

127115
func testFilters() throws {
128-
#if os(macOS)
129116
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
130117
throw XCTSkip("swift-api-digester not available")
131118
}
@@ -197,13 +184,9 @@ final class APIDiffTests: XCTestCase {
197184
XCTAssertTrue(stderr.contains("'Exec' is not a library target"))
198185
}
199186
}
200-
#else
201-
throw XCTSkip("Test unsupported on current platform")
202-
#endif
203187
}
204188

205189
func testAPIDiffOfModuleWithCDependency() throws {
206-
#if os(macOS)
207190
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
208191
throw XCTSkip("swift-api-digester not available")
209192
}
@@ -239,13 +222,9 @@ final class APIDiffTests: XCTestCase {
239222
XCTAssertTrue(stderr.contains("error: 'Foo' is not a Swift language target"))
240223
}
241224
}
242-
#else
243-
throw XCTSkip("Test unsupported on current platform")
244-
#endif
245225
}
246226

247227
func testNoBreakingChanges() throws {
248-
#if os(macOS)
249228
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
250229
throw XCTSkip("swift-api-digester not available")
251230
}
@@ -259,13 +238,9 @@ final class APIDiffTests: XCTestCase {
259238
XCTAssertTrue(output.contains("No breaking changes detected in Baz"))
260239
XCTAssertTrue(output.contains("No breaking changes detected in Qux"))
261240
}
262-
#else
263-
throw XCTSkip("Test unsupported on current platform")
264-
#endif
265241
}
266242

267243
func testAPIDiffAfterAddingNewTarget() throws {
268-
#if os(macOS)
269244
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
270245
throw XCTSkip("swift-api-digester not available")
271246
}
@@ -299,13 +274,9 @@ final class APIDiffTests: XCTestCase {
299274
XCTAssertTrue(output.contains("No breaking changes detected in Qux"))
300275
XCTAssertTrue(output.contains("Skipping Foo because it does not exist in the baseline"))
301276
}
302-
#else
303-
throw XCTSkip("Test unsupported on current platform")
304-
#endif
305277
}
306278

307279
func testBadTreeish() throws {
308-
#if os(macOS)
309280
guard (try? Resources.default.toolchain.getSwiftAPIDigester()) != nil else {
310281
throw XCTSkip("swift-api-digester not available")
311282
}
@@ -319,8 +290,5 @@ final class APIDiffTests: XCTestCase {
319290
XCTAssertTrue(stderr.contains("error: Couldn’t check out revision ‘7.8.9’"))
320291
}
321292
}
322-
#else
323-
throw XCTSkip("Test unsupported on current platform")
324-
#endif
325293
}
326294
}

0 commit comments

Comments
 (0)