-
-
Notifications
You must be signed in to change notification settings - Fork 600
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
Basic swift testing support #1154
Merged
Merged
Conversation
This file contains 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
This is not reliable, in fact, failure reporting is flaky.
younata
force-pushed
the
basic-swift-testing-support
branch
from
September 9, 2024 05:51
57dab73
to
66d00be
Compare
younata
force-pushed
the
basic-swift-testing-support
branch
from
September 9, 2024 05:52
66d00be
to
f3f7153
Compare
mergify bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Sep 21, 2024
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [Quick/Nimble](https://redirect.github.com/Quick/Nimble) | minor | `from: "13.4.0"` -> `from: "13.5.0"` | --- ### Release Notes <details> <summary>Quick/Nimble (Quick/Nimble)</summary> ### [`v13.5.0`](https://redirect.github.com/Quick/Nimble/releases/tag/v13.5.0) [Compare Source](https://redirect.github.com/Quick/Nimble/compare/v13.4.0...v13.5.0) #### What's Changed - Bump rexml from 3.2.8 to 3.3.6 by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1153](https://redirect.github.com/Quick/Nimble/pull/1153) - Basic swift testing support by [@​younata](https://redirect.github.com/younata) in [https://github.com/Quick/Nimble/pull/1154](https://redirect.github.com/Quick/Nimble/pull/1154) **Full Changelog**: Quick/Nimble@v13.4.0...v13.5.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
noamfreeman
pushed a commit
to noamfreeman/Nimble
that referenced
this pull request
Oct 14, 2024
* Provide basic integration with Swift Testing This is not reliable, in fact, failure reporting is flaky. * Spike utilizing my changes to Swift Testing to allow direct recording of issues * link to my branch of swift testing enabling public issues * Support the current version of Swift Testing * Fix broken tests * Fix a broken test helper * Correct a long-broken test because expectFailureMessageRegex has been a no-op for ages
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.
#1148, but uses what's in the current version of swift testing.
This provides a way for Nimble to natively integrate with Swift Testing.
It's not a great integration. The error message you see will be prefixed with "Issue recorded:" (e.g. "Issue recorded: expected to equal 1, got 2").
This starts recording the fileID & column of the source (to be passed in to Swift Testing).
It works primarily by adjusting the default assertion handler to try to detect whether we're running a Swift Testing test, or an XCTest test. It detects Swift Testing by using
Test.current
(which unfortunately breaks if you useTask.detached
. See swiftlang/swift-testing#475. However, the Swift Testing#expect
and#require
macros also fail in this case as well), and then falls back to reporting to XCTest if it doesn't detect swift testing.