test-better 0.2.1

Result-returning tests with `?`: composable matchers, rich failure output, no `.unwrap()`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Without a trailing `..`, every field must be listed: omitting `y` makes the
//! generated struct pattern incomplete, which rustc rejects.
use test_better::prelude::*;
use test_better::matches_struct;

struct Point {
    x: i32,
    y: i32,
}

fn main() {
    let point = Point { x: 1, y: 2 };
    let _ = check!(point).satisfies(matches_struct!(Point { x: eq(1) }));
}