Expand description
Assert for method is_match(…).
These macros help with any item that implements self.is_match(…).
-
assert_is_match!(matcher, matchee)≈ matcher.is_match(matchee) -
assert_not_match!(matcher, matchee)≈ !matcher.is_match(matchee)
§Example
use assertables::*;
use regex::Regex;
let a = Regex::new(r"lf").expect("regex");
let b = "alfa";
assert_is_match!(a, b);Modules§
- assert_
is_ match - Assert a matcher is a match for an expression.
- assert_
not_ match - Assert an expression (such as a regex) is not a match for an expression (such as a string).