@@ -109,7 +109,7 @@ supported")`.
109
109
110
110
Here are some concrete examples:
111
111
112
- | When running a Swift Testing test... | Current | Proposed (default) | Proposed (strict) |
112
+ | When running a Swift Testing test... | Current | Proposed | Proposed (strict) |
113
113
| ------------------------------------ | --------------- | -------------------------------------------- | ----------------- |
114
114
| ` XCTAssert ` failure is a ... | ‼️ No-op | ❌ Test Failure and ⚠️ Runtime Warning Issue | 💥 ` fatalError ` |
115
115
| ` XCTAssert ` success is a ... | No-op | ⚠️ Runtime Warning Issue | 💥 ` fatalError ` |
@@ -145,41 +145,38 @@ XCTest API _already_ provides similar functionality.
145
145
146
146
Here are some concrete examples:
147
147
148
- | When running a XCTest test... | Current | Proposed (default) | Proposed (strict) |
148
+ | When running a XCTest test... | Current | Proposed | Proposed (strict) |
149
149
| -------------------------------------------- | --------------- | ------------------------ | ----------------- |
150
150
| ` #expect ` failure is a ... | ‼️ No-op | ❌ Test Failure | ❌ Test Failure |
151
151
| ` #expect ` success is a ... | No-op | No-op | No-op |
152
152
| ` withKnownIssue ` wrapping ` XCTFail ` is a ... | ❌ Test Failure | ⚠️ Runtime Warning Issue | 💥 ` fatalError ` |
153
153
154
154
### Interoperability Modes
155
155
156
- The default interoperability mode surfaces test failures that were previously
157
- ignored. We also include two alternative interoperability modes:
158
-
159
156
- ** Warning-only** : This is for projects which do not want to see new test
160
157
failures surfaced due to interoperability.
161
158
162
- - ** Strict** : Warning issues included in the default mode can be easily
159
+ - ** Permissive** : This is the default interoperability mode, which surfaces test
160
+ failures that were previously ignored. It also includes runtime warning issues
161
+ for XCTest API usage in a Swift Testing context.
162
+
163
+ - ** Strict** : Warning issues included in the permissive mode can be easily
163
164
overlooked, especially in CI. The strict mode guarantees that no XCTest API
164
165
usage occurs when running Swift Testing tests by turning those warnings into a
165
166
` fatalError ` .
166
167
167
168
Configure the interoperability mode when running tests using the
168
169
` SWIFT_TESTING_XCTEST_INTEROP_MODE ` environment variable:
169
170
170
- | Interop Mode | Issue behaviour across framework boundary | ` SWIFT_TESTING_XCTEST_INTEROP_MODE ` |
171
- | ------------ | ----------------------------------------------------------------- | ------------------------------------------- |
172
- | Warning-only | ⚠️ Runtime Warning Issue for XCTest API usage | ` warning ` |
173
- | Default | ❌ Test Failure and ⚠️ Runtime Warning Issue for XCTest API usage | ` default ` , or empty value, or invalid value |
174
- | Strict | 💥 ` fatalError ` for XCTest API usage | ` strict ` |
175
-
176
- <!-- TODO: alternative name besides strict. It should reflect that, it does
177
- still have interop for SWT API in XCTest, but a hard failure going the other way
178
- around-->
171
+ | Interop Mode | Issue behaviour across framework boundary | ` SWIFT_TESTING_XCTEST_INTEROP_MODE ` |
172
+ | ------------ | ----------------------------------------------------------------- | ---------------------------------------------- |
173
+ | Warning-only | XCTest API: ⚠️ Runtime Warning Issue | ` warning-only ` |
174
+ | Permissive | XCTest API: ⚠️ Runtime Warning Issue. All Issues: ❌ Test Failure | ` permissive ` , or empty value, or invalid value |
175
+ | Strict | XCTest API: 💥 ` fatalError ` . Swift Testing API: ❌ Test Failure | ` strict ` |
179
176
180
177
### Phased Rollout
181
178
182
- When interoperability is first available, "default " will be the interop mode
179
+ When interoperability is first available, "permissive " will be the default interop mode
183
180
enabled for new projects. In a future release, "strict" will become the default
184
181
interop mode.
185
182
@@ -197,7 +194,7 @@ of options.
197
194
## Integration with supporting tools
198
195
199
196
Interoperability will be first available in future toolchain version,
200
- hypothetically named ` 6.X ` , where default interop mode will be enabled for
197
+ hypothetically named ` 6.X ` , where permissive interop mode will be enabled for
201
198
projects. After that, a ` 7.Y ` release would make strict interop mode the
202
199
default.
203
200
@@ -276,7 +273,7 @@ good balance between notifying users yet not breaking existing test suites.
276
273
- ** CLI option through SwiftPM:**
277
274
278
275
```
279
- swift test --interop-mode=warning-only
276
+ swift test --interop-mode=warning
280
277
```
281
278
282
279
This could be offered in addition to the proposed environment variable option,
0 commit comments