aboutsummaryrefslogtreecommitdiff
path: root/crates/assert_eq_text/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-17 14:04:34 +0100
committerAleksey Kladov <[email protected]>2018-08-17 14:04:34 +0100
commit41570f60bf268c97223a864b8aa11a339929f55a (patch)
tree1eabe16612f975a0e6bfeede79dcfea98d2b3aa4 /crates/assert_eq_text/src
parent081c16c77642a5c86ed72c5fbd11deccc2edd5d5 (diff)
extend module resolve to mod.rs
Diffstat (limited to 'crates/assert_eq_text/src')
-rw-r--r--crates/assert_eq_text/src/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/assert_eq_text/src/lib.rs b/crates/assert_eq_text/src/lib.rs
index ed942d81a..26b9bfb38 100644
--- a/crates/assert_eq_text/src/lib.rs
+++ b/crates/assert_eq_text/src/lib.rs
@@ -1,4 +1,9 @@
1extern crate difference; 1extern crate difference;
2extern crate itertools;
3
4use std::fmt;
5use itertools::Itertools;
6
2pub use self::difference::Changeset as __Changeset; 7pub use self::difference::Changeset as __Changeset;
3 8
4#[macro_export] 9#[macro_export]
@@ -23,3 +28,9 @@ macro_rules! assert_eq_text {
23 } 28 }
24 }}; 29 }};
25} 30}
31
32pub fn assert_eq_dbg(expected: &str, actual: &impl fmt::Debug) {
33 let actual = format!("{:?}", actual);
34 let expected = expected.lines().map(|l| l.trim()).join(" ");
35 assert_eq!(expected, actual);
36}