Skip to main content

gt

Function gt 

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

Matches a value strictly greater than expected.

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

fn main() -> TestResult {
    check!(1).satisfies(gt(0))?;
    check!(0).violates(gt(0))?;
    Ok(())
}