libtest-with 0.8.1-14

A slightly customized version of libtest-mimic, such that it can be easier create a test runner for test-with
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use libtest_with::{Trial, Arguments};


#[test]
fn check_test_on_main_thread() {
    let outer_thread = std::thread::current().id();

    let mut args = Arguments::default();
    args.test_threads = Some(1);
    let conclusion = libtest_with::run(&args, vec![Trial::test("check", move || {
        assert_eq!(outer_thread, std::thread::current().id());
        Ok(())
    })]);

    assert_eq!(conclusion.num_passed, 1);
}