Skip to content

Add a return type for exit tests. #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Oct 15, 2024

This PR adds a new structure, ExitTest.Result, that is returned from a call to #expect(exitsWith:) or #require(exitsWith:). It currently contains the actual exit condition of the test (which should equal the expected exit condition on success) but in the future we can add additional properties such as the standard output and standard error streams.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR adds a new structure, `ExitTest.Result`, that is returned from a call to
`#expect(exitsWith:)` or `#require(exitsWith:)`. It currently contains the
actual exit condition of the test (which should equal the expected exit
condition on success) but in the future we can add additional properties such as
the standard output and standard error streams.
@grynspan grynspan added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs public-api Affects public API exit-tests ☠️ Work related to exit tests labels Oct 15, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Oct 15, 2024
@grynspan grynspan self-assigned this Oct 15, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan requested a review from stmontgomery October 17, 2024 16:28
@grynspan grynspan merged commit 4810d90 into main Oct 17, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/exit-test-return-type branch October 17, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exit-tests ☠️ Work related to exit tests public-api Affects public API tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants