Skip to content

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

Open
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
Open

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 💬

@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
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 7c9b9e6 to 2981ca8 Compare August 25, 2026 03:26
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 2981ca8 to 480f04b Compare August 25, 2026 03:34
@bkhouri
bkhouri marked this pull request as ready for review August 25, 2026 03:38
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 480f04b to bd2ddd2 Compare August 25, 2026 03:54
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from bd2ddd2 to dccbc0e Compare August 25, 2026 03:56
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from dccbc0e to fe3b216 Compare August 25, 2026 04:01
Comment thread Tests/ArgumentParserEndToEndTests/DefaultSubcommandEndToEndTests.swift Outdated
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from fe3b216 to 3e052f6 Compare August 26, 2026 06:37
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 3e052f6 to 6669fc0 Compare August 26, 2026 06:41
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch 2 times, most recently from 3b91836 to bad4b13 Compare August 26, 2026 07:54
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from bad4b13 to 2a9d41c Compare August 26, 2026 18:18
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 2a9d41c to bfe8132 Compare August 26, 2026 19:55
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch 2 times, most recently from a069107 to 9c18249 Compare August 27, 2026 02:47
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch5 branch from 9c18249 to 40b9b52 Compare August 27, 2026 15:43
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 40b9b52 to c23468b Compare August 27, 2026 17:07
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.

2 participants