Skip to main content

is_empty

Function is_empty 

Source
pub fn is_empty<C>() -> impl Matcher<C>
where C: Sequence + ?Sized,
Expand description

Matches a sequence with no items.

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

fn main() -> TestResult {
    check!(Vec::<i32>::new()).satisfies(is_empty())?;
    Ok(())
}