macro_rules! assert_io_read_to_string_gt { ($a_reader:expr, $b:expr $(,)?) => { ... }; ($a_reader:expr, $b:expr, $($message:tt)+) => { ... }; }
Expand description
Assert a std::io::Read read_to_string() value is greater than another.
-
If true, return
(). -
Otherwise, call
panic!with a message and the values of the expressions with their debug representations.
§Examples
use std::io::Read;
let mut a = "alfa".as_bytes();
let mut b = "bravo".as_bytes();
assert_io_read_to_string_gt!(b, a);
let mut a = "alfa".as_bytes();
let mut b = "bravo".as_bytes();
assert_io_read_to_string_gt!(a, b);
// assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)`
// a label: `a`,
// a debug: `[]`,
// b label: `b`,
// b debug: `[]`,
// a: `\"alfa\"`,
// b: `\"bravo\"`