rust-pretty-assertions
rust-pretty-assertions copied to clipboard
Overwrite `assert_eq!` with a drop-in replacement, adding a colorful diff.
Hi and thanks for the helpful library! I was annoyed a few times now by the panic message only showing `(left == right)` instead of my actual arguments to the...
"left" and "right" are semantically neutral labels. In many cases, it would be easier to understand what is actually failing if the labels could be changed to a something with...
I'm trying to use pretty-assertions for [snapshot testing](https://blog.anp.lol/rust/2017/08/18/golden-master-regression-in-rust/). I compare the snapshotted multiline-string with the new value using the `PrettyString` trick from #24. When the actual result got indented (compared...
It's not a purely cosmetic idea. + and - in the first column of text makes it very easy to get diff syntax highlighting when you copy and paste test...
I just copied format_changeset.rs verbatim into a repo (cf. ) to get your fancy diff output without the assert/panic part :) Maybe it'd make sense to create at difference-formatters crate...
At the risk of being denounced as a heathen, is there any way that the default indent size of 4 spaces could be OPTIONALLY changed to, say, 2? 😉 Or...
I realize that obviates the purpose of this crate, but running code using this in settings where we have terminals without color support is a possibility. I briefly looked into...
When an object is big, the package fails to allocate its debug representation of it in the memory, so it fails. ```rs assert_eq!(big_obj, big_obj2) ``` The solution would be to...
Hello, I really like using this crate for my tests as it makes it a lot easier to spot which byte has changed or regressed from a change. It would...
Is there a way to get `pretty_assertions` to print less context, e.g., just a few lines before and after each difference? Apologies if this has been asked before. Also, this...