macro_rules! test_assert {
($func_name:ident, $arg:expr) => { ... };
}Expand description
Test that the given argument is expected to be true.
The first argument should be the test case name, and the second argument should be the arguments which is expected to be ‘true’.
§Example
fn is_err() -> bool {
true
}If you want to test this is_err function, you can write it as follows
test_macro::test_assert!(test_case_name, is_err());