Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.3 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.3 KB

similar-asserts

Crates.io License Documentation

similar-asserts is a crate that enhances the default assertion experience by using similar for diffing. It supports comparing either Debug or Serialize representations of values. On failed assertions it renders out a colorized diff to the terminal.

fn main() {
    let reference = vec![1, 2, 3, 4];
    similar_asserts::assert_eq!(reference, (0..4).collect::<Vec<_>>());
}

Related Projects

License and Links