ntest_test_cases

Crates.iontest_test_cases
lib.rsntest_test_cases
version0.9.3
sourcesrc
created_at2019-08-10 16:15:53.666819
updated_at2024-06-19 05:29:58.985032
descriptionTest cases for ntest framework.
homepage
repositoryhttps://github.com/becheran/ntest
max_upload_size
id155615
size16,988
Armin Becher (becheran)

documentation

https://docs.rs/ntest

README

NTest TestCases

Part of the NTest library. Add test cases to the rust test framework using procedural macros.

Examples

Example with a single argument:

#[test_case(13)]
#[test_case(42)]
fn one_arg(x: u32) {
    assert!(x == 13 || x == 42)
}

The test cases above will be parsed at compile time and two rust test functions will be generated instead:

#[test]
fn one_arg_13() {
    x = 13;
    assert!(x == 13 || x == 42)
}

#[test]
fn one_arg_42() {
    x = 42;
    assert!(x == 13 || x == 42)
}

For more examples and information read the documentation.

Commit count: 154

cargo fmt