-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tests marked as should_panic should report the line number of the test #137405
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
Labels
A-libtest
Area: `#[test]` / the `test` library
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-testing-devex
Relevant to the testing devex team (testing DX), which will review and decide on the PR/issue.
Comments
Is this currently being done by anyone? If not, I can try it. @joshka |
Not as far as I'm aware. I'd encourage you to go for it. This doesn't seem like it would have any downside, so I think perhaps a PR would be good here. |
@rustbot claim |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 18, 2025
Report line number of test when should_panic test failed Closing rust-lang#137405 r? `@joshka`
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Apr 7, 2025
Report line number of test when should_panic test failed Closing rust-lang#137405 r? `@joshka`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 7, 2025
Report line number of test when should_panic test failed Closing rust-lang#137405 r? `@joshka`
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 7, 2025
Report line number of test when should_panic test failed Closes rust-lang#137405 --- try-job: x86_64-gnu-llvm-19-3 try-job: test-various
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 7, 2025
Report line number of test when should_panic test failed Closes rust-lang#137405 --- try-job: x86_64-gnu-llvm-19-3 try-job: test-various
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 8, 2025
Report line number of test when should_panic test failed Closes rust-lang#137405 --- try-job: x86_64-gnu-llvm-19-3 try-job: test-various
ChrisDenton
added a commit
to ChrisDenton/rust
that referenced
this issue
Apr 13, 2025
Report line number of test when should_panic test failed Closes rust-lang#137405 --- try-job: x86_64-gnu-llvm-19-3 try-job: test-various
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Apr 19, 2025
Report line number of test when should_panic test failed Closes rust-lang#137405 --- try-job: x86_64-gnu-llvm-19-3 try-job: test-various
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-libtest
Area: `#[test]` / the `test` library
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-testing-devex
Relevant to the testing devex team (testing DX), which will review and decide on the PR/issue.
It would be useful for being able to easily navigate to failing tests if the tests don't panic when they should. Specifically, providing the file and line number of the failing test allows a user to use the mouse to navigate directly in one step from a test run in a vscode terminal window to the location of the failing test.
Given:
This reports:
Compare this with:
which gives:
Which in a vscode terminal looks like:
Implementation Constraints:
Use filename:line:column format - don't use a custom formate like "file at line x". Noted specifically This has happened in some parts of the rust ecosystem in the past (in rustfmt IIRC), and it makes the automatic navigation not work right.
The text was updated successfully, but these errors were encountered: