@@ -63,16 +63,14 @@ library.
63
63
64
64
## Proposed solution
65
65
66
- At a high level, we propose the following ** changes for APIs which are lossy
67
- without interop** :
66
+ - ** XCTest APIs which are lossy without interop will work as expected when
67
+ called in Swift Testing.** In addition, runtime diagnostics will be included
68
+ to highlight opportunities to adopt newer Swift Testing equivalent APIs.
68
69
69
- - ** XCTest API called in Swift Testing will work as expected.** In addition,
70
- runtime diagnostics will be included to highlight opportunities to adopt newer
71
- Swift Testing equivalent APIs.
72
-
73
- - Conversely, ** Swift Testing API called in XCTest will also work as expected.**
74
- You should always feel empowered to choose Swift Testing when writing new
75
- tests or test helpers, as it will work properly in both types of tests.
70
+ - Conversely, ** Swift Testing API called in XCTest will work as expected if
71
+ XCTest already provides similar functionality.** You should always feel
72
+ empowered to choose Swift Testing when writing new tests or test helpers, as
73
+ it will work properly in both types of tests.
76
74
77
75
We don't propose supporting interoperability for APIs without risk of data loss,
78
76
because they naturally have high visibility. For example, using ` throw XCTSkip `
@@ -81,7 +79,7 @@ providing a clear indication that migration is needed.
81
79
82
80
## Detailed design
83
81
84
- ### Highlight usage of XCTest APIs in Swift Testing tests
82
+ ### Highlight and support XCTest APIs which are lossy without interop
85
83
86
84
We propose supporting the following XCTest APIs in Swift Testing:
87
85
@@ -115,7 +113,7 @@ Here are some concrete examples:
115
113
| ` XCTAssert ` success is a ... | No-op | ⚠️ Runtime Warning Issue | 💥 ` fatalError ` |
116
114
| ` throw XCTSkip ` is a ... | ❌ Test Failure | ❌ Test Failure | ❌ Test Failure |
117
115
118
- ### Limited support for Swift Testing APIs in XCTest
116
+ ### Targeted support for Swift Testing APIs with XCTest API equivalents
119
117
120
118
We propose supporting the following Swift Testing APIs in XCTest:
121
119
@@ -176,9 +174,9 @@ Configure the interoperability mode when running tests using the
176
174
177
175
### Phased Rollout
178
176
179
- When interoperability is first available, "permissive" will be the default interop mode
180
- enabled for new projects. In a future release, "strict" will become the default
181
- interop mode.
177
+ When interoperability is first available, "permissive" will be the default
178
+ interop mode enabled for new projects. In a future release, "strict" will become
179
+ the default interop mode.
182
180
183
181
## Source compatibility
184
182
@@ -187,9 +185,9 @@ lead to situations where previously "passing" test code now starts showing
187
185
failures. We believe this should be a net positive if it can highlight actual
188
186
bugs you would have missed previously.
189
187
190
- You can use ` SWIFT_TESTING_XCTEST_INTEROP_MODE=off ` in the short-term to revert back to
191
- the current behaviour. Refer to the "Interoperability Modes" section for a full list
192
- of options.
188
+ You can use ` SWIFT_TESTING_XCTEST_INTEROP_MODE=off ` in the short-term to revert
189
+ back to the current behaviour. Refer to the "Interoperability Modes" section for
190
+ a full list of options.
193
191
194
192
## Integration with supporting tools
195
193
0 commit comments