Migrate large end-to-end suites to Swift Testing - #952
Draft
bkhouri wants to merge 1 commit into
Draft
Conversation
Migrate seven `ArgumentParserEndToEndTests` suites from XCTest to Swift Testing: - `SourceCompatEndToEndTests` - `UnparsedValuesEndToEndTests` - `DefaultSubcommandEndToEndTests` - `FlagsEndToEndTests` - `NestedCommandEndToEndTests` - `RepeatingEndToEndTests` - `RepeatingEndToEndTests+ParsingStrategy` (extension of the above) `FlagsEndToEndTests` previously had a small `FlagsEndToEndTestsSWT` Swift Testing suite alongside the XCTest class; fold its `parsingCaseIterable_Help` test back into the main suite so all flag-parsing tests live in one place. `NestedCommandEndToEndTests` had a private `AssertParseFooCommand` helper that curried `AssertParseCommand` with `Foo.self` as the root; port it to `expectParseFooCommand` calling `expectParseCommand` for the same purpose. `DefaultSubcommandEndToEndTests` previously used `AssertParseCommandErrorMessage` (XCTest-only, not ported to Swift Testing yet). Inline the parse-and-check-message logic in that one test with `#require` on `Test.current` semantics. `RepeatingEndToEndTests+ParsingStrategy` is an extension of `RepeatingEndToEndTests` and must be migrated in the same PR so `extension RepeatingEndToEndTests` refers to the new `@Suite struct` rather than the old `XCTestCase` class. Relates to #710
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch5
branch
from
August 22, 2026 01:46
167bcf2 to
7c9b9e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate seven
ArgumentParserEndToEndTestssuites from XCTest to SwiftTesting:
SourceCompatEndToEndTestsUnparsedValuesEndToEndTestsDefaultSubcommandEndToEndTestsFlagsEndToEndTestsNestedCommandEndToEndTestsRepeatingEndToEndTestsRepeatingEndToEndTests+ParsingStrategy(extension of the above)FlagsEndToEndTestspreviously had a smallFlagsEndToEndTestsSWTSwift Testing suite alongside the XCTest class; fold its
parsingCaseIterable_Helptest back into the main suite so allflag-parsing tests live in one place.
NestedCommandEndToEndTestshad a privateAssertParseFooCommandhelper that curried
AssertParseCommandwithFoo.selfas the root;port it to
expectParseFooCommandcallingexpectParseCommandforthe same purpose.
DefaultSubcommandEndToEndTestspreviously usedAssertParseCommandErrorMessage(XCTest-only, not ported to SwiftTesting yet). Inline the parse-and-check-message logic in that one
test with
#requireonTest.currentsemantics.RepeatingEndToEndTests+ParsingStrategyis an extension ofRepeatingEndToEndTestsand must be migrated in the same PR soextension RepeatingEndToEndTestsrefers to the new@Suite structrather than the old
XCTestCaseclass.Relates to #710
Checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬