Skip to main content

is_not_empty

Function is_not_empty 

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

Matches a sequence with at least one item.

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

fn main() -> TestResult {
    check!(vec![1]).satisfies(is_not_empty())?;
    Ok(())
}