-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
tests with #[should_panic] should print a message on failure #60790
Comments
I'm not familiar with the code, but I'd guess that you just need to change |
Thanks.I would like to work on this. |
@chansuke: go ahead! If you have any questions, feel free to ask them here. |
@varkor Hi.I've added the
|
@varkor Thanks |
The previous fix was closed, so this issue is open again. The previous PR contains detailed instructions. |
I'd like to finish this out if @chansuke is no longer working on it. |
…varkor Include message on tests that should panic but do not As per issue rust-lang#60790 includes a message for tests marked `#[should_panic]` that do not panic as expected. Fixes rust-lang#60790.
…varkor Include message on tests that should panic but do not As per issue rust-lang#60790 includes a message for tests marked `#[should_panic]` that do not panic as expected. Fixes rust-lang#60790.
…varkor Include message on tests that should panic but do not As per issue rust-lang#60790 includes a message for tests marked `#[should_panic]` that do not panic as expected. Fixes rust-lang#60790.
When a
#[should_panic]
#[test]
fails because there was no panic it should produce an error message to that effect.For example, the following test:
when run with
cargo test
produces the following output:There is no indication why it failed. Which can be problematic if the test itself is created by a macro. Example: https://github.com/BurntSushi/fst/blob/master/src/raw/tests.rs#L131-L140
The text was updated successfully, but these errors were encountered: