Skip to main content

assert_not_match_values

Macro assert_not_match_values 

Source
macro_rules! assert_not_match_values {
    ($current:expr, $nok_value:pat, $ok_value:pat) => { ... };
    ($current:expr, $nok_value:pat, $ok_value:pat, $msg:expr) => { ... };
}
Expand description

Assert on invalid values.

§Arguments

  • $current - Current value.
  • $nok_value - Value that set the assertion valid.
  • $ok_value - Value to set the assertion in error.
  • $msg - (Optional) Assertion error message.

§Examples

use utmt::assert_not_match_values;
use utmt::facility_match_values; // Warning: specific to doctest

assert_not_match_values!(true, false, true);
use utmt::assert_not_match_values;
use utmt::facility_match_values; // Warning: specific to doctest

assert_not_match_values!(true, true, false);