macro_rules! check_count {
($ident:ident, $count: literal) => { ... };
}Expand description
Checks that a specified mark was hit exactly the specified number of times.
ยงExample
struct CoveredDropper;
impl Drop for CoveredDropper {
fn drop(&mut self) {
cov_mark::hit!(covered_dropper_drops);
}
}
#[test]
fn drop_count_test() {
cov_mark::check_count!(covered_dropper_drops, 2);
let _covered_dropper1 = CoveredDropper;
let _covered_dropper2 = CoveredDropper;
}