Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Dec 13, 2024

Motivation

swift-testing offers a more convenient way to write test cases. For
instance, it makes table-driven tests much easier to write than XCTest.

Modifications

This commit rewrites the existing XCTest test cases to use swift-testing. It is a mechanical translation using the rules in:

https://developer.apple.com/documentation/testing/migratingfromxctest

It does not try to adapt the style of the tests to swift-testing.

Result

The tests run using swift-testing with minimal changes. A future change will adapt them to make better use of the new framework's facilities.

One immediate improvement is that the swift-testing tests can be run with the OSS Swift toolchain on macOS. XCTests cannot, because the framework is not included in the OSS toolchain.

Test Plan

All tests continue to pass.

@euanh euanh force-pushed the feature/swift-testing branch from 1a651a3 to 0a79beb Compare December 13, 2024 14:25
@euanh euanh added semver/none No version bump required. area/testing Improvements to tests. labels Dec 13, 2024
@euanh euanh force-pushed the feature/swift-testing branch 3 times, most recently from 16501b1 to 5161be9 Compare December 13, 2024 14:35
Motivation
----------

swift-testing offers a more convenient way to write test cases.   For
instance, it makes table-driven tests much easier to write than XCTest.

Modifications
-------------

This commit rewrites the existing XCTest test cases to use swift-testing.
It is a mechanical translation using the rules in:

   https://developer.apple.com/documentation/testing/migratingfromxctest

Result
------

The tests run using swift-testing with minimal changes.
A future change will adapt them to make better use of the new framework's facilities.

Test Plan
---------

All tests continue to pass.
@euanh euanh changed the title Tests: Mechanically convert to swift-testing tests: Mechanically convert to swift-testing Dec 13, 2024
@euanh euanh force-pushed the feature/swift-testing branch from 5161be9 to b000e89 Compare December 13, 2024 14:39
@euanh euanh marked this pull request as ready for review December 13, 2024 14:45
@euanh euanh merged commit 9e707ef into apple:main Dec 13, 2024
17 checks passed
@euanh euanh deleted the feature/swift-testing branch December 13, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Improvements to tests. semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant