Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add u128 and i128 integer tests #79123

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/core/tests/num/i128.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int_module!(i128, i128);
6 changes: 3 additions & 3 deletions library/core/tests/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions library/core/tests/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use core::str::FromStr;
#[macro_use]
mod int_macros;

mod i128;
mod i16;
mod i32;
mod i64;
Expand All @@ -19,6 +20,7 @@ mod i8;
#[macro_use]
mod uint_macros;

mod u128;
mod u16;
mod u32;
mod u64;
Expand Down
1 change: 1 addition & 0 deletions library/core/tests/num/u128.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uint_module!(u128, u128);
6 changes: 3 additions & 3 deletions library/core/tests/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down