Macro assertables::assert_io_eq[][src]

macro_rules! assert_io_eq {
    ($left:expr, $right:expr $(,)?) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}

Assert two values are equal.

  • When true, return Ok(true).

  • Otherwise, call panic! with a message and the values of the expressions with their debug representations.

Examples

assert_io_eq!(1, 1);
//-> ()
// assert_io_eq!(1, 2);
//-> panic!("assertion failed: `assert_io_eq(left, right)`\n  left: `1`,\n right: `2`")

This macro has a second form where a custom message can be provided.