assert_test

Macro assert_test 

Source
macro_rules! assert_test {
    ($test_name:ident, $assertion:expr) => { ... };
}
Expand description

Generate a simple assertion test.

Creates a test function with a given name and assertion.

§Examples

assert_test!(test_addition, 2 + 2 == 4);
assert_test!(test_string, "hello".len() == 5);