Check output of checked_div in std_example
This commit is contained in:
parent
a7c0cfc113
commit
90a7ee6c70
@ -58,8 +58,8 @@ fn main() {
|
|||||||
assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7);
|
assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7);
|
||||||
assert_eq!(core::intrinsics::saturating_sub(0, -170141183460469231731687303715884105728i128), 170141183460469231731687303715884105727i128);
|
assert_eq!(core::intrinsics::saturating_sub(0, -170141183460469231731687303715884105728i128), 170141183460469231731687303715884105727i128);
|
||||||
|
|
||||||
let _d = 0i128.checked_div(2i128);
|
assert!(0i128.checked_div(2i128).is_some());
|
||||||
let _d = 0u128.checked_div(2u128);
|
assert!(0u128.checked_div(2u128).is_some());
|
||||||
assert_eq!(1u128 + 2, 3);
|
assert_eq!(1u128 + 2, 3);
|
||||||
|
|
||||||
assert_eq!(0b100010000000000000000000000000000u128 >> 10, 0b10001000000000000000000u128);
|
assert_eq!(0b100010000000000000000000000000000u128 >> 10, 0b10001000000000000000000u128);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user