Migrate remaining unit tests to Swift Testing - #955
Open
bkhouri wants to merge 1 commit into
Open
Conversation
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 25, 2026 03:26
e5d13a3 to
d21f57a
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 25, 2026 03:34
d21f57a to
158ad21
Compare
bkhouri
marked this pull request as ready for review
August 25, 2026 03:37
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
2 times, most recently
from
August 25, 2026 03:56
114fdb8 to
f646e96
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 25, 2026 04:01
f646e96 to
b303158
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
2 times, most recently
from
August 26, 2026 06:37
28a844f to
6220084
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
2 times, most recently
from
August 26, 2026 07:49
6c0fad1 to
fcbe973
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 26, 2026 07:54
fcbe973 to
af7c768
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
2 times, most recently
from
August 26, 2026 19:55
1faeafe to
2977e87
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 26, 2026 23:18
2977e87 to
dc31f44
Compare
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
2 times, most recently
from
August 27, 2026 15:43
125a5eb to
a2ebda3
Compare
Migrate three `ArgumentParserUnitTests` suites from XCTest to Swift Testing: - `HelpGenerationTests` — the base file was already using `@Suite`, `@Test`, and `#expect`; drop the stale `import XCTest`. The `+*.swift` extension files were migrated in earlier PRs. - `ParsableArgumentsValidationTests` — the largest unit-test file. One assertion required an update: comparing `error.type` (an existential `any ParsableArguments.Type`) against a concrete type fails to type-check under `#expect`'s stricter operand resolution, so wrap both sides in `ObjectIdentifier`. - `CompletionScriptTests` — marked `@Suite(.serialized)` because the tests share the `CompletionShell.requesting` global while generating completion scripts. Under XCTest the sequential runner hid this; Swift Testing's default parallelism caused cross-shell contamination in the generated scripts. Private `assertCustomCompletion(s)` ported to `expectCustomCompletion(s)`. Relates to #710
bkhouri
force-pushed
the
bkhouri/t/main/migrate_tests_to_swift_testing_batch7
branch
from
August 27, 2026 17:07
a2ebda3 to
73ab4d1
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 three
ArgumentParserUnitTestssuites from XCTest to SwiftTesting:
HelpGenerationTests— the base file was already using@Suite,@Test, and#expect; drop the staleimport XCTest. The+*.swiftextension files were migrated in earlier PRs.ParsableArgumentsValidationTests— the largest unit-test file.One assertion required an update: comparing
error.type(anexistential
any ParsableArguments.Type) against a concrete typefails to type-check under
#expect's stricter operand resolution,so wrap both sides in
ObjectIdentifier.CompletionScriptTests— marked@Suite(.serialized)because thetests share the
CompletionShell.requestingglobal whilegenerating completion scripts. Under XCTest the sequential runner
hid this; Swift Testing's default parallelism caused cross-shell
contamination in the generated scripts. Private
assertCustomCompletion(s)ported toexpectCustomCompletion(s).Relates to #710
Checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬