| commit | a463c09ed779f226f59688343e1bbe24111f0602 | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Oct 15 23:09:43 2024 +0000 |
| committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Oct 15 23:09:43 2024 +0000 |
| tree | e40a027db9c31d507e5437177d1791009d46e21a | |
| parent | a22b42d05ca64408c76dfd150556b4da052c0f6f [diff] | |
| parent | 3e8f9ac6ff9661267a597f811f07f4063e652a28 [diff] |
Snap for 12503729 from 3e8f9ac6ff9661267a597f811f07f4063e652a28 to sdk-release Change-Id: I8436920d6be1dc4a3c5db4433016f6aa032defa6
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