Skip to content

Migrate large end-to-end suites to Swift Testing - #952

Draft
bkhouri wants to merge 1 commit into
bkhouri/t/main/migrate_tests_to_swift_testing_batch4from
bkhouri/t/main/migrate_tests_to_swift_testing_batch5
Draft

Migrate large end-to-end suites to Swift Testing#952
bkhouri wants to merge 1 commit into
bkhouri/t/main/migrate_tests_to_swift_testing_batch4from
bkhouri/t/main/migrate_tests_to_swift_testing_batch5

Conversation

@bkhouri

@bkhouri bkhouri commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

Stack created with GitHub Stacks CLIGive Feedback 💬

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
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 167bcf2 to 7c9b9e6 Compare August 22, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant