rust-pretty-assertions icon indicating copy to clipboard operation
rust-pretty-assertions copied to clipboard

Overwrite `assert_eq!` with a drop-in replacement, adding a colorful diff.

Results 29 rust-pretty-assertions issues
Sort by recently updated
recently updated
newest added

The output produced by a difference with new lines is not very clear. To reproduce : ```rs #[test] fn f() { pretty_assertions::assert_eq!("\n", "\r\n"); } ``` ```sh thread 'test::f' panicked at...

When diffing 2 big objects which have a small difference in the middle, it's very hard to know what exactly gone wrong. I have to either scroll the terminal, or...

We use rust-pretty-assertions for [lychee](https://github.com/lycheeverse/lychee). There is a PR for upgrading to 1.2.0 [here](https://github.com/lycheeverse/lychee/pull/552), which fails because of the changes in #92. Previously, using `assert_eq` on two `HashSet`s would work,...

ANSI colours aren't available ... a) when the compiler output is piped, e.g. into an editor or IDE b) in some terminals without the support Much like the Rust compiler's...

help wanted

This PR uses proc macro magic to cut down the boilerplate needed to define macros that fit the `assert_eq` and `assert_ne` api. Our own `assert_eq` is now simply defined as:...

Fully implements customizable labelling and diff style for `assert_eq!(...)` and `assert_ne!(...)`, but easily extended). Fixes: #35 Fixes: #37 Alternative to: #33, #39

Running an `assert_eq` on a large string is extremely slow with this library enabled. I noticed it when I added a placeholder assertion before starting some coding. A regular assertion...

help wanted

To check for edge cases that may induce crashes on edge case input sequences.

Fixes #35 If users prefer `-/+` to ``, they can add this to `Cargo.toml`: ```toml [dev-dependencies] pretty_assertions = { version = "*", features = ["git-style-diff"] } ``` This probably isn't...

I cannot compare larger XML files with assert_eq!() because it hangs and runs into a memory leak. Just a test case to reproduce the problem, I have not looked into...