Skip to content

Commit 200fdd7

Browse files
authored
Add a missing #if !SWT_NO_EXIT_TESTS. (#896)
This PR adds a missing `#if !SWT_NO_EXIT_TESTS` statement in order to resolve a build failure on platforms that do not support exit tests (such as WASI.) ### Checklist: - [ ] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [ ] If public symbols are renamed or modified, DocC references should be updated.
1 parent 6f7688a commit 200fdd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Testing/Test+Discovery+Legacy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public protocol __TestContainer {
2424
/// `__TestContainer` protocol.
2525
let testContainerTypeNameMagic = "__🟠$test_container__"
2626

27+
#if !SWT_NO_EXIT_TESTS
2728
/// A protocol describing a type that contains an exit test.
2829
///
2930
/// - Warning: This protocol is used to implement the `#expect(exitsWith:)`
@@ -44,6 +45,7 @@ public protocol __ExitTestContainer {
4445
/// A string that appears within all auto-generated types conforming to the
4546
/// `__ExitTestContainer` protocol.
4647
let exitTestContainerTypeNameMagic = "__🟠$exit_test_body__"
48+
#endif
4749

4850
// MARK: -
4951

0 commit comments

Comments
 (0)