From f7892db1fd11a30d8af27ebd3700b84ecfdcbda7 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Tue, 7 Jan 2025 15:15:18 -0500 Subject: [PATCH] Add a missing `#if !SWT_NO_EXIT_TESTS`. 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.) --- Sources/Testing/Test+Discovery+Legacy.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Testing/Test+Discovery+Legacy.swift b/Sources/Testing/Test+Discovery+Legacy.swift index 746c4128f..b65d72b39 100644 --- a/Sources/Testing/Test+Discovery+Legacy.swift +++ b/Sources/Testing/Test+Discovery+Legacy.swift @@ -24,6 +24,7 @@ public protocol __TestContainer { /// `__TestContainer` protocol. let testContainerTypeNameMagic = "__🟠$test_container__" +#if !SWT_NO_EXIT_TESTS /// A protocol describing a type that contains an exit test. /// /// - Warning: This protocol is used to implement the `#expect(exitsWith:)` @@ -44,6 +45,7 @@ public protocol __ExitTestContainer { /// A string that appears within all auto-generated types conforming to the /// `__ExitTestContainer` protocol. let exitTestContainerTypeNameMagic = "__🟠$exit_test_body__" +#endif // MARK: -