-
Notifications
You must be signed in to change notification settings - Fork 39
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
Test does not run when passed a negative number #18
Comments
Hi @ColinPitrat , thanks to report it. trunk version at least point the issue by a meaningful error message:
I'll fix it ASAP but I cannot release the fix till the next version that I planned in the next month (I hope). As work around you can use
|
Thanks for the tip. On top of fixing it, I wonder if there would be a way to ensure this kind of failures don't go unnoticed. The good practice is to make a test fail before making it pass to avoid this kind of problem but it's easy to forget and not even notice that some tests are not running. |
From the next release this kind of odd behavior should never happen. Every kind of wrong syntax or parsing errors will be reported. |
corner cases. Now syntax like case(some(42)) works but I don't know if I really want it ... by now I accept it.
General case will be traced in #19 |
I've been puzzled by tests that wouldn't run. I finally traced it down to giving a negative argument.
The following works:
and produces the following output:
Adding a case with a negative value, the test doesn't run anymore:
it produces the following output:
The issue happens with or without nightly.
cargo 1.33.0 (f099fe94b 2019-02-12)
rustc 1.33.0 (2aa4c46cf 2019-02-28)
cargo 1.35.0-nightly (6f3e9c367 2019-04-04)
rustc 1.35.0-nightly (acd8dd6a5 2019-04-05)
I'm using rstest 0.2.2. From Cargo.lock:
The text was updated successfully, but these errors were encountered: