rust-pretty-assertions
rust-pretty-assertions copied to clipboard
Overwrite `assert_eq!` with a drop-in replacement, adding a colorful diff.
Supersedes #79 Relates to #38, #105, #114 This PR proposes an extensible system for customising diff output, by prefixing invocation with a `config = ...` argument. ```rust use pretty_assertions::assert_eq; use...
Hi, not certain if it applies to your crate, but please be aware of https://twitter.com/m_ou_se/status/1691410284227747843
Due to real world brightness issues out of my control, I have to switch back and forth between a light and dark terminal scheme twice per day. `rust-pretty-assertions` look great...
Ref #100 If left and right are not equal, but we cannot print any diff, then make sure to print warning instead. example: ```rust use pretty_assertions::assert_eq; fn main() { assert_eq!("\n",...
Asserting on top-level structs that contain a data hierarchy works and is very useful. However, strings are always output as single line strings and I could not find a way...
As discussed in https://github.com/rust-pretty-assertions/rust-pretty-assertions/issues/31.
This way, tools (such as RustRover) that do not work with the functionality of this plugin can easily turn off this tool with a single line change in cargo.toml instead...
When the new feature `enable-via-env` is enabled, pretty-assertions will only be active when the environment variable `RUST_PRETTY_ASSERTIONS=1`. Otherwise, the standard library assertion macros are used. Opt-in is the most defensive...
API Request: Add support for compare between value and reference to value, i.e. `assert_eq!(1, &1)`
`assert_eq!` and `assert_ne!` macros would be even more convenient to use if they supported `(&T, T)` (and `(T, &T)`) comparision - which is not something std `assert_eq!` supports, I know,...