Macro assertables::assert_set_ne [−][src]
macro_rules! assert_set_ne { ($left:expr, $right:expr $(,)?) => { ... }; ($left:expr, $right:expr, $($arg:tt)+) => { ... }; }
Expand description
Assert two sets are not equal.
-
When true, return
Ok(true). -
Otherwise, call
panic!with a message and the values of the expressions with their debug representations.
Examples
assert_set_ne!([1, 2], [3, 4]); //-> ()
// assert_set_ne!([1, 2], [1, 2]); //-> panic!("assertion failed: `assert_set_ne(left, right)`\n left: `[1, 2]`\n right: `[1, 2]`")
This macro has a second form where a custom message can be provided.
This implementation uses [HashSet] to count items.