macro_rules! assert_io_read_to_string_lt { ($a_reader:expr, $b:expr $(,)?) => { ... }; ($a_reader:expr, $b:expr, $($message:tt)+) => { ... }; }
Expand description
Assert a std::io::Read read_to_string() value is less 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_lt!(a, b);
let mut a = "bravo".as_bytes();
let mut b = "alfa".as_bytes();
assert_io_read_to_string_lt!(a, b);
// assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)`
// a label: `a`,
// a debug: `[]`,
// b label: `b`,
// b debug: `[]`,
// a: `\"bravo\"`,
// b: `\"alfa\"`