OSDK check and clippy with cfg(ktest)

This commit is contained in:
Zhang Junyang
2024-08-15 15:17:59 +08:00
committed by Tate, Hongliang Tian
parent be3492d7f0
commit d76c7a5b1e
16 changed files with 48 additions and 39 deletions

View File

@ -134,8 +134,8 @@ mod test {
#[ktest]
fn calculation() {
let coeff = Coeff::new(23456, 56789, 1_000_000_000);
assert!(coeff * 0 as u64 == 0);
assert!(coeff * 100 as u64 == 100 * 23456 / 56789);
assert!(coeff * 1_000_000_000 as u64 == 1_000_000_000 * 23456 / 56789);
assert!(coeff * 0_u64 == 0);
assert!(coeff * 100_u64 == 100 * 23456 / 56789);
assert!(coeff * 1_000_000_000_u64 == 1_000_000_000 * 23456 / 56789);
}
}