matches_tuple!() { /* proc-macro */ }Expand description
Matches a tuple struct by applying an inner matcher to each positional field.
Without a trailing .. every element must be listed; with .. the unlisted
trailing elements are ignored.
ⓘ
use test_better::prelude::*;
use test_better::matches_tuple;
#[derive(Debug)]
struct Point(i32, i32);
fn check(point: Point) -> TestResult {
check!(point).satisfies(matches_tuple!(Point(gt(0), lt(100))))?;
Ok(())
}