assert_iter_ne

Macro assert_iter_ne 

Source
macro_rules! assert_iter_ne {
    ($a_collection:expr, $b_collection:expr $(,)?) => { ... };
    ($a_collection:expr, $b_collection:expr, $($message:tt)+) => { ... };
}
Expand description

Assert an iterable is not equal to 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 = [1, 2];
let b = [3, 4];
assert_iter_ne!(&a, &b);

// This will panic
let a = [1, 2];
let b = [1, 2];
assert_iter_ne!(&a, &b);
// assertion failed: `assert_iter_ne!(a_collection, b_collection)`
// https://docs.rs/assertables/…/assertables/macro.assert_iter_ne.html
//  a label: `&a`,
//  a debug: `[1, 2]`,
//  b label: `&b`,
//  b debug: `[1, 2]`

This implementation uses ::std::iter::Iterator.

§Module macros