Skip to main content

ne

Function ne 

Source
pub fn ne<T>(expected: T) -> impl Matcher<T>
where T: PartialEq + Debug,
Expand description

Matches a value not equal to expected.

use test_better_core::TestResult;
use test_better_matchers::{ne, check};

fn main() -> TestResult {
    check!(5).satisfies(ne(4))?;
    check!(4).violates(ne(4))?;
    Ok(())
}