Add u128 and i128 integer tests
This commit is contained in:
parent
25f6938da4
commit
6554086526
1
library/core/tests/num/i128.rs
Normal file
1
library/core/tests/num/i128.rs
Normal file
@ -0,0 +1 @@
|
||||
int_module!(i128, i128);
|
@ -131,9 +131,9 @@ macro_rules! int_module {
|
||||
assert_eq!(B.rotate_left(0), B);
|
||||
assert_eq!(C.rotate_left(0), C);
|
||||
// Rotating by a multiple of word size should also have no effect
|
||||
assert_eq!(A.rotate_left(64), A);
|
||||
assert_eq!(B.rotate_left(64), B);
|
||||
assert_eq!(C.rotate_left(64), C);
|
||||
assert_eq!(A.rotate_left(128), A);
|
||||
assert_eq!(B.rotate_left(128), B);
|
||||
assert_eq!(C.rotate_left(128), C);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -11,6 +11,7 @@ use core::str::FromStr;
|
||||
#[macro_use]
|
||||
mod int_macros;
|
||||
|
||||
mod i128;
|
||||
mod i16;
|
||||
mod i32;
|
||||
mod i64;
|
||||
@ -19,6 +20,7 @@ mod i8;
|
||||
#[macro_use]
|
||||
mod uint_macros;
|
||||
|
||||
mod u128;
|
||||
mod u16;
|
||||
mod u32;
|
||||
mod u64;
|
||||
|
1
library/core/tests/num/u128.rs
Normal file
1
library/core/tests/num/u128.rs
Normal file
@ -0,0 +1 @@
|
||||
uint_module!(u128, u128);
|
@ -96,9 +96,9 @@ macro_rules! uint_module {
|
||||
assert_eq!(B.rotate_left(0), B);
|
||||
assert_eq!(C.rotate_left(0), C);
|
||||
// Rotating by a multiple of word size should also have no effect
|
||||
assert_eq!(A.rotate_left(64), A);
|
||||
assert_eq!(B.rotate_left(64), B);
|
||||
assert_eq!(C.rotate_left(64), C);
|
||||
assert_eq!(A.rotate_left(128), A);
|
||||
assert_eq!(B.rotate_left(128), B);
|
||||
assert_eq!(C.rotate_left(128), C);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user