Skip to content

Commit 08728d7

Browse files
authored
Mark exit tests unavailable in Embedded Swift. (#1341)
For the moment at least, we don't support exit tests in Embedded Swift. We can investigate supporting them in the future. ### 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 192dc75 commit 08728d7

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

Sources/Testing/ExitTests/ExitTest.CapturedValue.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ private import _TestingInternals
1212

1313
@_spi(ForToolsIntegrationOnly)
1414
#if SWT_NO_EXIT_TESTS
15+
@_unavailableInEmbedded
1516
@available(*, unavailable, message: "Exit tests are not available on this platform.")
1617
#endif
1718
extension ExitTest {

Sources/Testing/ExitTests/ExitTest.Condition.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
private import _TestingInternals
1212

1313
#if SWT_NO_EXIT_TESTS
14+
@_unavailableInEmbedded
1415
@available(*, unavailable, message: "Exit tests are not available on this platform.")
1516
#endif
1617
extension ExitTest {
@@ -58,6 +59,7 @@ extension ExitTest {
5859
// MARK: -
5960

6061
#if SWT_NO_EXIT_TESTS
62+
@_unavailableInEmbedded
6163
@available(*, unavailable, message: "Exit tests are not available on this platform.")
6264
#endif
6365
extension ExitTest.Condition {
@@ -177,6 +179,7 @@ extension ExitTest.Condition {
177179
// MARK: - CustomStringConvertible
178180

179181
#if SWT_NO_EXIT_TESTS
182+
@_unavailableInEmbedded
180183
@available(*, unavailable, message: "Exit tests are not available on this platform.")
181184
#endif
182185
extension ExitTest.Condition: CustomStringConvertible {
@@ -199,6 +202,7 @@ extension ExitTest.Condition: CustomStringConvertible {
199202
// MARK: - Comparison
200203

201204
#if SWT_NO_EXIT_TESTS
205+
@_unavailableInEmbedded
202206
@available(*, unavailable, message: "Exit tests are not available on this platform.")
203207
#endif
204208
extension ExitTest.Condition {

Sources/Testing/ExitTests/ExitTest.Result.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//
1010

1111
#if SWT_NO_EXIT_TESTS
12+
@_unavailableInEmbedded
1213
@available(*, unavailable, message: "Exit tests are not available on this platform.")
1314
#endif
1415
extension ExitTest {

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private import _TestingInternals
3535
/// @Available(Xcode, introduced: 26.0)
3636
/// }
3737
#if SWT_NO_EXIT_TESTS
38+
@_unavailableInEmbedded
3839
@available(*, unavailable, message: "Exit tests are not available on this platform.")
3940
#endif
4041
public struct ExitTest: Sendable, ~Copyable {

Sources/Testing/Expectations/Expectation+Macro.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ public macro require<R>(
877877
@freestanding(expression)
878878
@discardableResult
879879
#if SWT_NO_EXIT_TESTS
880+
@_unavailableInEmbedded
880881
@available(*, unavailable, message: "Exit tests are not available on this platform.")
881882
#endif
882883
public macro expect(
@@ -924,6 +925,7 @@ public macro expect(
924925
@freestanding(expression)
925926
@discardableResult
926927
#if SWT_NO_EXIT_TESTS
928+
@_unavailableInEmbedded
927929
@available(*, unavailable, message: "Exit tests are not available on this platform.")
928930
#endif
929931
public macro require(

0 commit comments

Comments
 (0)