Skip to content

Commit

Permalink
docs ~ add customized assertion example
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Feb 25, 2020
1 parent 2f39b86 commit 0d65b17
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/pretty_assertion_custom.rs
@@ -0,0 +1,17 @@
#[allow(unused_imports)]
use pretty_assertions;

macro_rules! assert_eq { ($($arg:tt)+) => ({
pretty_assertions::with_config_assert_eq!(
pretty_assertions::Config {
auto_label: true,
style: pretty_assertions::Color::Yellow.normal(),
prefix: "<=>",
prefix_left: "<<=", prefix_right: "=>>",
..Default::default()
},
$($arg)+
)
})}

include!("standard_assertion.rs");

0 comments on commit 0d65b17

Please sign in to comment.