@@ -28,7 +28,6 @@ final class APIDiffTests: XCTestCase {
28
28
}
29
29
30
30
func testSimpleAPIDiff( ) throws {
31
- #if os(macOS)
32
31
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
33
32
throw XCTSkip ( " swift-api-digester not available " )
34
33
}
@@ -47,13 +46,9 @@ final class APIDiffTests: XCTestCase {
47
46
XCTAssertTrue ( output. contains ( " 💔 API breakage: func foo() has been removed " ) )
48
47
}
49
48
}
50
- #else
51
- throw XCTSkip ( " Test unsupported on current platform " )
52
- #endif
53
49
}
54
50
55
51
func testMultiTargetAPIDiff( ) throws {
56
- #if os(macOS)
57
52
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
58
53
throw XCTSkip ( " swift-api-digester not available " )
59
54
}
@@ -77,13 +72,9 @@ final class APIDiffTests: XCTestCase {
77
72
XCTAssertTrue ( output. contains ( " 💔 API breakage: func bar() has been removed " ) )
78
73
}
79
74
}
80
- #else
81
- throw XCTSkip ( " Test unsupported on current platform " )
82
- #endif
83
75
}
84
76
85
77
func testCheckVendedModulesOnly( ) throws {
86
- #if os(macOS)
87
78
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
88
79
throw XCTSkip ( " swift-api-digester not available " )
89
80
}
@@ -119,13 +110,9 @@ final class APIDiffTests: XCTestCase {
119
110
XCTAssertFalse ( output. contains ( " 💔 API breakage: var Qux.x has been removed " ) )
120
111
}
121
112
}
122
- #else
123
- throw XCTSkip ( " Test unsupported on current platform " )
124
- #endif
125
113
}
126
114
127
115
func testFilters( ) throws {
128
- #if os(macOS)
129
116
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
130
117
throw XCTSkip ( " swift-api-digester not available " )
131
118
}
@@ -197,13 +184,9 @@ final class APIDiffTests: XCTestCase {
197
184
XCTAssertTrue ( stderr. contains ( " 'Exec' is not a library target " ) )
198
185
}
199
186
}
200
- #else
201
- throw XCTSkip ( " Test unsupported on current platform " )
202
- #endif
203
187
}
204
188
205
189
func testAPIDiffOfModuleWithCDependency( ) throws {
206
- #if os(macOS)
207
190
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
208
191
throw XCTSkip ( " swift-api-digester not available " )
209
192
}
@@ -239,13 +222,9 @@ final class APIDiffTests: XCTestCase {
239
222
XCTAssertTrue ( stderr. contains ( " error: 'Foo' is not a Swift language target " ) )
240
223
}
241
224
}
242
- #else
243
- throw XCTSkip ( " Test unsupported on current platform " )
244
- #endif
245
225
}
246
226
247
227
func testNoBreakingChanges( ) throws {
248
- #if os(macOS)
249
228
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
250
229
throw XCTSkip ( " swift-api-digester not available " )
251
230
}
@@ -259,13 +238,9 @@ final class APIDiffTests: XCTestCase {
259
238
XCTAssertTrue ( output. contains ( " No breaking changes detected in Baz " ) )
260
239
XCTAssertTrue ( output. contains ( " No breaking changes detected in Qux " ) )
261
240
}
262
- #else
263
- throw XCTSkip ( " Test unsupported on current platform " )
264
- #endif
265
241
}
266
242
267
243
func testAPIDiffAfterAddingNewTarget( ) throws {
268
- #if os(macOS)
269
244
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
270
245
throw XCTSkip ( " swift-api-digester not available " )
271
246
}
@@ -299,13 +274,9 @@ final class APIDiffTests: XCTestCase {
299
274
XCTAssertTrue ( output. contains ( " No breaking changes detected in Qux " ) )
300
275
XCTAssertTrue ( output. contains ( " Skipping Foo because it does not exist in the baseline " ) )
301
276
}
302
- #else
303
- throw XCTSkip ( " Test unsupported on current platform " )
304
- #endif
305
277
}
306
278
307
279
func testBadTreeish( ) throws {
308
- #if os(macOS)
309
280
guard ( try ? Resources . default. toolchain. getSwiftAPIDigester ( ) ) != nil else {
310
281
throw XCTSkip ( " swift-api-digester not available " )
311
282
}
@@ -319,8 +290,5 @@ final class APIDiffTests: XCTestCase {
319
290
XCTAssertTrue ( stderr. contains ( " error: Couldn’t check out revision ‘7.8.9’ " ) )
320
291
}
321
292
}
322
- #else
323
- throw XCTSkip ( " Test unsupported on current platform " )
324
- #endif
325
293
}
326
294
}
0 commit comments