Skip to content

test runner tasks could take their name from the test's name #10195

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

Closed
huonw opened this issue Oct 31, 2013 · 2 comments · Fixed by #10204
Closed

test runner tasks could take their name from the test's name #10195

huonw opened this issue Oct 31, 2013 · 2 comments · Fixed by #10204

Comments

@huonw
Copy link
Member

huonw commented Oct 31, 2013

E.g.

#[test]
fn test_foo() {
    assert_eq!(1, 2);
}

would be more useful it if it printed task 'test_foo' failed at 'assertion failed: ... rather than task '<unnamed>' failed at 'assertion failed: ....

This would make finding the cause of a FAILED in the spew of #[should_fail] fail!s easier, at least until we get capturing/redisplay-as-necessary of the output.

@brson
Copy link
Contributor

brson commented Oct 31, 2013

Awesome idea!

@alexcrichton
Copy link
Member

I, too, think that sliced bread pales in comparison to this!

bors added a commit that referenced this issue Nov 1, 2013
Tests now have the same name as the test that they're running (to allow for
easier diagnosing of failure sources), and the main task is now specially named
`<main>` instead of `<unnamed>`.

Closes #10195
Closes #10073
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 15, 2024
Fixes rust-lang#10195.

changelog: Added new [`literal_string_with_formatting_args`] `pedantic`
lint
[rust-lang#13410](rust-lang/rust-clippy#13410)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants