test-better 0.2.2

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
//! A field name that the struct does not have is rejected by the generated
//! destructure, even with a trailing `..`.
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), z: eq(0), .. }));
}