about summary refs log tree commit diff
path: root/example/std_example.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-07-24 17:16:31 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-07-26 11:30:39 +0200
commit5180becc7c11573d267166437abf3d9951c6b0c7 (patch)
treeff6f0783d29b33437d4fc3ff2f303a3e5aae3266 /example/std_example.rs
parent63b82238bbe54643c63a8693299d6a9f4c0b0358 (diff)
downloadrust-5180becc7c11573d267166437abf3d9951c6b0c7.tar.gz
rust-5180becc7c11573d267166437abf3d9951c6b0c7.zip
Fix 128bit CValue::const_val
Diffstat (limited to 'example/std_example.rs')
-rw-r--r--example/std_example.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs
index f9fc1f2cde3..465b6143525 100644
--- a/example/std_example.rs
+++ b/example/std_example.rs
@@ -19,6 +19,9 @@ fn checked_div_u128(lhs: u128, rhs: u128) -> Option<u128> {
 }
 
 fn main() {
+    assert_eq!(0b0000000000000000000000000010000010000000000000000000000000000000_0000000000100000000000000000000000001000000000000100000000000000u128.leading_zeros(), 26);
+    assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7);
+
     checked_div_i128(0i128, 2i128);
     checked_div_u128(0u128, 2u128);
     assert_eq!(1u128 + 2, 3);