macro_rules! assert_iter_gt {
($a_collection:expr, $b_collection:expr $(,)?) => { ... };
($a_collection:expr, $b_collection:expr, $($message:tt)+) => { ... };
}Expand description
Assert an iterable is greater than another.
Pseudocode:
(collection1 into iter) > (collection2 into iter)
-
If true, return
(). -
Otherwise, call
panic!with a message and the values of the expressions with their debug representations.
§Examples
use assertables::*;
let a = [3, 4];
let b = [1, 2];
assert_iter_gt!(&a, &b);
// This will panic
let a = [1, 2];
let b = [3, 4];
assert_iter_gt!(&a, &b);
// assertion failed: `assert_iter_gt!(a_collection, b_collection)`
// https://docs.rs/assertables/…/assertables/macro.assert_iter_gt.html
// a label: `&a`,
// a debug: `[1, 2]`,
// b label: `&b`,
// b debug: `[3, 4]`This implementation uses ::std::iter::Iterator.