Skip to main content

assert_match_values

Macro assert_match_values 

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

Assertion for matching specific values.

§Arguments

  • $current - Current value.
  • $ok_value - Awaiting valid value for assertion.
  • $nok_value - Value that invalids this assertion.
  • $msg - (Optional) Specific assertion message.

§Examples

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

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

assert_match_values!(false, true, false);