Macro assertables::assume_set_ne[][src]

macro_rules! assume_set_ne {
    ($left:expr, $right:expr $(,)?) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}

Assume two sets are not equal.

  • When true, return Ok(true).

  • Otherwise, return Err with a message and the values of the expressions with their debug representations.

Example

let a = [1, 2];
let b = [3, 4];
assume_set_ne!(&a, &b);
//-> Ok(true)
let a = [1, 2];
let b = [1, 2];
assume_set_ne!(&a, &b);
//-> Err("assume_set_ne left:[1, 2] right:[1, 2]")

This macro has a second form where a custom message can be provided.

This implementation uses [HashSet] to count items.