pub enum TrueFalseMatcher {
True,
False,
}Expand description
TrueFalseMatcher provides a way to assert whether boolean values evaluate to true or false.
§Example
use clearcheck::matchers::bool::be_true;
use clearcheck::matchers::Matcher;
let matcher = be_true();
assert!(matcher.test(&true).passed());Variants§
Trait Implementations§
Source§impl Matcher<bool> for TrueFalseMatcher
impl Matcher<bool> for TrueFalseMatcher
fn test(&self, value: &bool) -> MatcherResult
Auto Trait Implementations§
impl Freeze for TrueFalseMatcher
impl RefUnwindSafe for TrueFalseMatcher
impl Send for TrueFalseMatcher
impl Sync for TrueFalseMatcher
impl Unpin for TrueFalseMatcher
impl UnsafeUnpin for TrueFalseMatcher
impl UnwindSafe for TrueFalseMatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ShouldNot<T> for T
impl<T> ShouldNot<T> for T
Source§fn should_not(&self, matcher: &dyn Matcher<T>)
fn should_not(&self, matcher: &dyn Matcher<T>)
Takes a matcher as input and performs an inverted assertion against the value itself.Inverts the result of the matcher’s test method, ensuring the value does not match.Panics if the inverted assertion fails, indicating that the value unexpectedly matched the matcher. Read more