Skip to content

Migrate tooling test targets to Swift Testing - #956

Open
bkhouri wants to merge 1 commit into
bkhouri/t/main/migrate_tests_to_swift_testing_batch7from
bkhouri/t/main/migrate_tests_to_swift_testing_batch8
Open

Migrate tooling test targets to Swift Testing#956
bkhouri wants to merge 1 commit into
bkhouri/t/main/migrate_tests_to_swift_testing_batch7from
bkhouri/t/main/migrate_tests_to_swift_testing_batch8

Conversation

@bkhouri

@bkhouri bkhouri commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Migrate the two tooling test targets from XCTest to Swift Testing:

  • Tests/ArgumentParserGenerateDoccReferenceTests/GenerateDoccReferenceTests
  • Tests/ArgumentParserGenerateManualTests/GenerateManualTests

Add two Swift Testing helpers to TestHelpers+SwiftTesting.swift
that mirror the XCTest-only versions in TestHelpers.swift:

  • expectGenerateManual(multiPage:command:) — runs the
    generate-manual executable and compares against .mdoc snapshots.
  • expectGeneratedReference(command:doccFlavored:) — runs the
    generate-docc-reference executable and compares against .md
    snapshots (docc-flavored or plain).

Both preserve the #function-based snapshot lookup so existing
baselines under Snapshots/ are found without renaming.

With this PR, no test files in the repository import XCTest.

Closes #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_batch8 branch 2 times, most recently from e1d6d00 to 4eb5235 Compare August 25, 2026 03:34
@bkhouri
bkhouri marked this pull request as ready for review August 25, 2026 03:36
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from 4eb5235 to 62187ef Compare August 25, 2026 03:54
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from 62187ef to 27a7818 Compare August 25, 2026 03:56
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from 27a7818 to 0d15b5e Compare August 25, 2026 04:01
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch 2 times, most recently from 4d1a394 to 59a2f90 Compare August 25, 2026 16:30
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch 2 times, most recently from 3a4c24a to fc75b82 Compare August 26, 2026 06:41
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from fc75b82 to 9d2bffc Compare August 26, 2026 07:49
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch 2 times, most recently from 00dcfbb to e66e88f Compare August 26, 2026 18:18
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from e66e88f to acc2849 Compare August 26, 2026 19:55
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from acc2849 to d081ae1 Compare August 26, 2026 23:18
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from d081ae1 to 1ffd715 Compare August 27, 2026 02:47
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch 2 times, most recently from 81946ff to b619d97 Compare August 27, 2026 15:52
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch 2 times, most recently from 391bbe2 to 3d49e0b Compare August 27, 2026 17:45
Migrate the two tooling test targets from XCTest to Swift Testing:

- `Tests/ArgumentParserGenerateDoccReferenceTests/GenerateDoccReferenceTests`
- `Tests/ArgumentParserGenerateManualTests/GenerateManualTests`

Add two Swift Testing helpers to `TestHelpers+SwiftTesting.swift`
that mirror the XCTest-only versions in `TestHelpers.swift`:

- `expectGenerateManual(multiPage:command:)` — runs the
  `generate-manual` executable and compares against `.mdoc` snapshots.
- `expectGeneratedReference(command:doccFlavored:)` — runs the
  `generate-docc-reference` executable and compares against `.md`
  snapshots (docc-flavored or plain).

Both preserve the `#function`-based snapshot lookup so existing
baselines under `Snapshots/` are found without renaming.

With this PR, no test files in the repository import XCTest.

Closes #710
@bkhouri
bkhouri force-pushed the bkhouri/t/main/migrate_tests_to_swift_testing_batch8 branch from 3d49e0b to 2b1dd6f Compare August 27, 2026 17:54
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.

Switch to swift testing

1 participant