Conversation
grynspan
reviewed
Feb 14, 2025
| ```swift | ||
| // Before | ||
| class RefrigeratorTests : XCTestCase | ||
| func testLightComesOn() async { |
Contributor
There was a problem hiding this comment.
These functions are all marked async, but none of them uses await and all of them use try. Did you mean to mark them throws instead?
Contributor
Author
There was a problem hiding this comment.
Actually I just followed the existing examples in this article, for example the one in "Annotate known issues" that starts at line 574. Should we take a look at all of the examples in this article and decide what their signatures should be?
grynspan
reviewed
Feb 14, 2025
grynspan
reviewed
Feb 14, 2025
grynspan
reviewed
Feb 14, 2025
grynspan
reviewed
Feb 14, 2025
Contributor
Author
|
Fixes #863 |
grynspan
reviewed
Feb 18, 2025
| @Column { | ||
| ```swift | ||
| // Before | ||
| class RefrigeratorTests : XCTestCase |
Contributor
There was a problem hiding this comment.
Suggested change
| class RefrigeratorTests : XCTestCase | |
| class RefrigeratorTests : XCTestCase { |
grynspan
approved these changes
Feb 18, 2025
Contributor
|
Documentation changes only, can skip CI. |
| class RefrigeratorTests : XCTestCase { | ||
| func testLightComesOn() throws { | ||
| try FoodTruck.shared.refrigerator.openDoor() | ||
| XCTAssertEqual(FoodTruck.shared.refrigerator.lightState == .on) |
Contributor
There was a problem hiding this comment.
Suggested change
| XCTAssertEqual(FoodTruck.shared.refrigerator.lightState == .on) | |
| XCTAssertEqual(FoodTruck.shared.refrigerator.lightState, .on) |
(Same comment in the XCTest below as well)
2 tasks
iamleeg
added a commit
that referenced
this pull request
Feb 19, 2025
…960) Describe test serialization in the article about migrating tests from XCTest. ### Motivation: Because XCTest runs tests in a suite serially by default, tests that people migrate from XCTest may encounter issues if they run in parallel. ### Modifications: Add an example of serializing a test suite to the migration guide, along with links to the docs about test parallelization. ### Result: The documentation on migrating tests from XCTest includes guidance on serializing tests within a suite. ### Checklist: - [X] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [X] If public symbols are renamed or modified, DocC references should be updated.
iamleeg
added a commit
that referenced
this pull request
Feb 19, 2025
…uide (#965) - **Explanation**: Updates the article on migrating tests from XCTest to tell developers about test serialization. - **Scope**: Documentation updates. - **Issues**: #863 - **Original PRs**: #960 #963 - **Risk**: Purely documentation updates, no risk to the release. - **Testing**: Build documentation and read Migrating a test from XCTest. - **Reviewers**: @grynspan @stmontgomery
2 tasks
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.
Describe test serialization in the article about migrating tests from XCTest.
Motivation:
Because XCTest runs tests in a suite serially by default, tests that people migrate from XCTest may encounter issues if they run in parallel.
Modifications:
Add an example of serializing a test suite to the migration guide, along with links to the docs about test parallelization.
Result:
The documentation on migrating tests from XCTest includes guidance on serializing tests within a suite.
Checklist: