Skip to content
Myr

macros.rs

This file

Path

crates/printer/src/macros.rs

24 lines · 670 bytes · Rust

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 5f5da48 point at it.

globset: support nested alternatesLuke Sandbergbefore adoption5f5da48

lines 1–24why, one step back
1/// Like assert_eq, but nicer output for long strings.
2#[cfg(test)]3#[macro_export]4macro_rules! assert_eq_printed {5 ($expected:expr, $got:expr) => {6 let expected = &*$expected;7 let got = &*$got;8 if expected != got {9 panic!("10printed outputs differ!1112expected:13~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~14{}15~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1617got:18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~19{}20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~21", expected, got);22 }23 }24}