-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Pretty print assertion failures in tests #79001
Closed
Closed
Commits on Oct 20, 2021
-
Add assertion details to panic info.
The assertion details are added as a new enum field, allowing for future extensions with different information for other sources of panics. For example, `.unwrap()` could extend the enum to store a `&dyn Error` in the panic info. The panic handler in `std` passes the additional info unmodified to the panic hook.
Configuration menu - View commit details
-
Copy full SHA for 0df6e33 - Browse repository at this point
Copy the full SHA 0df6e33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0994b8a - Browse repository at this point
Copy the full SHA 0994b8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d57b2da - Browse repository at this point
Copy the full SHA d57b2daView commit details -
Mark panic::ExtraInfo as non-exhaustive.
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Configuration menu - View commit details
-
Copy full SHA for 9596fce - Browse repository at this point
Copy the full SHA 9596fceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f8140e - Browse repository at this point
Copy the full SHA 7f8140eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5886466 - Browse repository at this point
Copy the full SHA 5886466View commit details -
Include macro name in pretty printed assertion.
And use a comma to separate arguments of `assert_eq` and `assert_ne`. This has two advantages: * The printed text more closely matches the actual source code. * It avoids changing the meaning of $left == $right if $left or $right contain operators themselves.
Configuration menu - View commit details
-
Copy full SHA for 3ff9a91 - Browse repository at this point
Copy the full SHA 3ff9a91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b03d3a - Browse repository at this point
Copy the full SHA 3b03d3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b87907 - Browse repository at this point
Copy the full SHA 4b87907View commit details -
Unify signatures of
GetConsoleMode
by changingHANDLE
toc_void
`GetConsoleMode` was declared twice with different signatures. The signatures have contained different definitions of `HANDLE`.
Configuration menu - View commit details
-
Copy full SHA for ec39e42 - Browse repository at this point
Copy the full SHA ec39e42View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0279b3 - Browse repository at this point
Copy the full SHA e0279b3View commit details
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.