Skip to content

Commit 405d8c9

Browse files
authored
Work around a crash importing FoundationXML. (#786)
This PR works around a new crash importing FoundationXML See: - https://ci-external.swift.org/job/swift-testing-pull-request-windows/832/ - https://ci.swift.org/job/pr-swift-testing-linux-5.10/1319/console Works around rdar://138761752. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 144f0c5 commit 405d8c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/TestingTests/EventRecorderTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import RegexBuilder
1515
#if canImport(Foundation)
1616
import Foundation
1717
#endif
18-
#if canImport(FoundationXML)
18+
#if SWT_FIXED_138761752 && canImport(FoundationXML)
1919
import FoundationXML
2020
#endif
2121

@@ -299,7 +299,7 @@ struct EventRecorderTests {
299299
}
300300
#endif
301301

302-
#if canImport(Foundation) || canImport(FoundationXML)
302+
#if (SWT_TARGET_OS_APPLE && canImport(Foundation)) || (SWT_FIXED_138761752 && canImport(FoundationXML))
303303
@Test(
304304
"JUnitXMLRecorder outputs valid XML",
305305
.bug("https://github.com/swiftlang/swift-testing/issues/254")

0 commit comments

Comments
 (0)