@@ -103,15 +103,11 @@ struct APIDiffTests {
103103 string: " public class Qux<T, U> { private let x = 1 } "
104104 )
105105 await expectThrowsCommandExecutionError ( try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " ] , packagePath: packageRoot, buildSystem: buildSystem) ) { error in
106- withKnownIssue {
107- #expect( error. stdout. contains ( " 2 breaking changes detected in Qux " ) )
108- #expect( error. stdout. contains ( " 💔 API breakage: class Qux has generic signature change from <T> to <T, U> " ) )
109- #expect( error. stdout. contains ( " 💔 API breakage: var Qux.x has been removed " ) )
110- #expect( error. stdout. contains ( " 1 breaking change detected in Baz " ) )
111- #expect( error. stdout. contains ( " 💔 API breakage: func bar() has been removed " ) )
112- } when: {
113- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
114- }
106+ #expect( error. stdout. contains ( " 2 breaking changes detected in Qux " ) )
107+ #expect( error. stdout. contains ( " 💔 API breakage: class Qux has generic signature change from <T> to <T, U> " ) )
108+ #expect( error. stdout. contains ( " 💔 API breakage: var Qux.x has been removed " ) )
109+ #expect( error. stdout. contains ( " 1 breaking change detected in Baz " ) )
110+ #expect( error. stdout. contains ( " 💔 API breakage: func bar() has been removed " ) )
115111 }
116112 }
117113 }
@@ -142,16 +138,11 @@ struct APIDiffTests {
142138 packagePath: packageRoot, buildSystem: buildSystem)
143139 ) { error in
144140 #expect( !error. stdout. contains ( " 💔 API breakage: class Qux has generic signature change from <T> to <T, U> " ) )
145- withKnownIssue {
146- #expect( error. stdout. contains ( " 1 breaking change detected in Qux " ) )
147- #expect( error. stdout. contains ( " 💔 API breakage: var Qux.x has been removed " ) )
148- #expect( error. stdout. contains ( " 1 breaking change detected in Baz " ) )
149- #expect( error. stdout. contains ( " 💔 API breakage: func bar() has been removed " ) )
150- } when: {
151- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
152- }
141+ #expect( error. stdout. contains ( " 1 breaking change detected in Qux " ) )
142+ #expect( error. stdout. contains ( " 💔 API breakage: var Qux.x has been removed " ) )
143+ #expect( error. stdout. contains ( " 1 breaking change detected in Baz " ) )
144+ #expect( error. stdout. contains ( " 💔 API breakage: func bar() has been removed " ) )
153145 }
154-
155146 }
156147 }
157148
@@ -180,16 +171,11 @@ struct APIDiffTests {
180171 string: " public class Qux<T, U> { private let x = 1 } "
181172 )
182173 try await expectThrowsCommandExecutionError ( try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " ] , packagePath: packageRoot, buildSystem: buildSystem) ) { error in
183- try withKnownIssue {
184- #expect( error. stdout. contains ( " 💔 API breakage " ) )
185- let regex = try Regex ( " \\ d+ breaking change(s?) detected in Foo " )
186- #expect( error. stdout. contains ( regex) )
187- #expect( error. stdout. contains ( regex) )
188- #expect( error. stdout. contains ( regex) )
189- } when: {
190- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
191- }
192-
174+ #expect( error. stdout. contains ( " 💔 API breakage " ) )
175+ let regex = try Regex ( " \\ d+ breaking change(s?) detected in Foo " )
176+ #expect( error. stdout. contains ( regex) )
177+ #expect( error. stdout. contains ( regex) )
178+ #expect( error. stdout. contains ( regex) )
193179 // Qux is not part of a library product, so any API changes should be ignored
194180 #expect( !error. stdout. contains ( " Qux " ) )
195181 }
@@ -226,18 +212,10 @@ struct APIDiffTests {
226212 try await expectThrowsCommandExecutionError (
227213 try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " , " --products " , " One " , " --targets " , " Bar " ] , packagePath: packageRoot, buildSystem: buildSystem)
228214 ) { error in
229- withKnownIssue {
230- #expect( error. stdout. contains ( " 💔 API breakage " ) )
231- } when: {
232- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
233- }
215+ #expect( error. stdout. contains ( " 💔 API breakage " ) )
234216 let regex = try Regex ( " \\ d+ breaking change(s?) detected in Foo " )
235217
236- withKnownIssue {
237- #expect( error. stdout. contains ( regex) )
238- } when: {
239- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
240- }
218+ #expect( error. stdout. contains ( regex) )
241219
242220 // Baz and Qux are not included in the filter, so any API changes should be ignored.
243221 #expect( !error. stdout. contains ( " Baz " ) )
@@ -248,14 +226,9 @@ struct APIDiffTests {
248226 try await expectThrowsCommandExecutionError (
249227 try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " , " --targets " , " Baz " ] , packagePath: packageRoot, buildSystem: buildSystem)
250228 ) { error in
251- try withKnownIssue {
252- #expect( error. stdout. contains ( " 💔 API breakage " ) )
253- let regex = try Regex ( " \\ d+ breaking change(s?) detected in Baz " )
254- #expect( error. stdout. contains ( regex) )
255- } when: {
256- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
257- }
258-
229+ #expect( error. stdout. contains ( " 💔 API breakage " ) )
230+ let regex = try Regex ( " \\ d+ breaking change(s?) detected in Baz " )
231+ #expect( error. stdout. contains ( regex) )
259232 // Only Baz is included, we should not see any other API changes.
260233 #expect( !error. stdout. contains ( " Foo " ) )
261234 #expect( !error. stdout. contains ( " Bar " ) )
@@ -279,7 +252,7 @@ struct APIDiffTests {
279252 . tags(
280253 . Feature. Command. Run,
281254 ) ,
282- . requiresAPIDigester,
255+ . requiresAPIDigester,
283256 arguments: SupportedBuildSystemOnAllPlatforms
284257 )
285258 func testAPIDiffOfModuleWithCDependency( buildSystem: BuildSystemProvider . Kind ) async throws {
@@ -341,20 +314,16 @@ struct APIDiffTests {
341314 arguments: SupportedBuildSystemOnAllPlatforms,
342315 )
343316 func testNoBreakingChanges( buildSystem: BuildSystemProvider . Kind ) async throws {
344- try await withKnownIssue {
345- try await fixture ( name: " Miscellaneous/APIDiff/ " ) { fixturePath in
346- let packageRoot = fixturePath. appending ( " Bar " )
347- // Introduce an API-compatible change
348- try localFileSystem. writeFileContents (
349- packageRoot. appending ( components: " Sources " , " Baz " , " Baz.swift " ) ,
350- string: " public func bar() -> Int { 100 } "
351- )
352- let ( output, _) = try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " ] , packagePath: packageRoot, buildSystem: buildSystem)
353- #expect( output. contains ( " No breaking changes detected in Baz " ) )
354- #expect( output. contains ( " No breaking changes detected in Qux " ) )
355- }
356- } when : {
357- buildSystem == . swiftbuild && ProcessInfo . isHostAmazonLinux2 ( )
317+ try await fixture ( name: " Miscellaneous/APIDiff/ " ) { fixturePath in
318+ let packageRoot = fixturePath. appending ( " Bar " )
319+ // Introduce an API-compatible change
320+ try localFileSystem. writeFileContents (
321+ packageRoot. appending ( components: " Sources " , " Baz " , " Baz.swift " ) ,
322+ string: " public func bar() -> Int { 100 } "
323+ )
324+ let ( output, _) = try await execute ( [ " diagnose-api-breaking-changes " , " 1.2.3 " ] , packagePath: packageRoot, buildSystem: buildSystem)
325+ #expect( output. contains ( " No breaking changes detected in Baz " ) )
326+ #expect( output. contains ( " No breaking changes detected in Qux " ) )
358327 }
359328 }
360329
0 commit comments