Bug: 364711528

Clone this repo:
  1. 3e8f9ac Migrate 25 crates to monorepo by James Farrell · 4 months ago main aml_cbr_351111000 aml_con_351110000 aml_per_351112300 aml_sdk_351110000
  2. e5c655b Restore LICENSE-MIT to match crate archive. by James Farrell · 4 months ago
  3. 1cbda32 Merge remote-tracking branch 'origin/upstream' by Frank Piva · 4 months ago
  4. 5e1e5d8 Import 'cov-mark' crate by Li-Yu Yu · 5 months ago upstream
  5. 84cb8a2 Initial empty repository by Frank Piva · 5 months ago

cov-mark

Verify that your tests exercise the conditions you think they are exercising

fn safe_divide(dividend: u32, divisor: u32) -> u32 {
    if divisor == 0 {
        cov_mark::hit!(save_divide_zero);
        return 0;
    }
    dividend / divisor
}

#[test]
fn test_safe_divide_by_zero() {
    cov_mark::check!(save_divide_zero);
    assert_eq!(safe_divide(92, 0), 0);
}

See the docs for details