Hello Swift Community!
In implementing and utilizing interoperability between Swift Testing and XCTest, @jerryjrchen and @smontgomery uncovered an oversight in the original proposal. As originally proposed, the "limited" interop mode discourages migrating from XCTest-style assertions to Swift Testing-style assertions. For example, with the current "limited" interop mode, making the following refactor would shift the test suite from correctly failing to incorrectly passing (but recording a runtime warning):
class MyXCTest: XCTestCase {
func testSample() {
<<<<<<
XCTFail("uh oh")
======
Issue.record("uh oh")
>>>>>>
}
}
Test authors working to adopt Swift Testing-style assertions before migrating to a Swift Testing test structure would either be forced to also migrate their test structure (defeating the purpose of interop in the first place), or to enable "complete" interop (defeating the purpose of "limited" interop).
To address this, @jerryjrchen proposed an amendment, which includes this rationale in even more detail in the alternatives considered section.
I will be running an expedited review of this change from now until April 29, 2026.
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
- What is your evaluation of the proposal?
- Is the problem being addressed significant enough to warrant a change to Swift?
- Does this proposal fit well with the feel and direction of Swift?
- If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
- How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
More information about the Swift evolution process is available at:
swift-evolution/process.md at main · swiftlang/swift-evolution · GitHub
Thank you for contributing to Swift!
Rachel Brindle
Review Manager