Crate libtest2

Crate libtest2 

Source
Expand description

An experimental replacement for libtest

§Usage

To use this, you most likely want to add a manual [[test]] section to Cargo.toml and set harness = false. For example:

[[test]]
name = "mytest"
path = "tests/mytest.rs"
harness = false

And in tests/mytest.rs you would call libtest2_main, passing it each of your tests:

fn check_toph(_context: &TestContext) -> RunResult {
    Ok(())
}

libtest2_main!(check_toph);

Macros§

libtest2_main
Expands to the test harness

Structs§

Harness
RunError
TestContext
Trial

Enums§

TestKind
Type of the test according to the rust book conventions.

Constants§

ERROR_EXIT_CODE

Type Aliases§

RunResult