diff options
| author | Marco A L Barbosa <malbarbo@gmail.com> | 2017-10-19 15:49:59 -0200 |
|---|---|---|
| committer | Marco A L Barbosa <malbarbo@gmail.com> | 2017-10-20 13:18:16 -0200 |
| commit | e57ee3d0bf8d8b11feccab49432d4c5e8fc3a3ca (patch) | |
| tree | af1db29dc844adcecc14e0810f5ae1d4a19713ab /src/libcore | |
| parent | dbcd1bec6150a259fea16ddae6c5881b4b676217 (diff) | |
| download | rust-e57ee3d0bf8d8b11feccab49432d4c5e8fc3a3ca.tar.gz rust-e57ee3d0bf8d8b11feccab49432d4c5e8fc3a3ca.zip | |
Fix some tests for linux gnux32
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/tests/hash/sip.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libcore/tests/hash/sip.rs b/src/libcore/tests/hash/sip.rs index 4a9657e0340..c6dd41798f2 100644 --- a/src/libcore/tests/hash/sip.rs +++ b/src/libcore/tests/hash/sip.rs @@ -243,24 +243,22 @@ fn test_siphash_2_4() { t += 1; } } -#[test] #[cfg(target_arch = "arm")] + +#[test] +#[cfg(target_pointer_width = "32")] fn test_hash_usize() { let val = 0xdeadbeef_deadbeef_u64; assert!(hash(&(val as u64)) != hash(&(val as usize))); assert_eq!(hash(&(val as u32)), hash(&(val as usize))); } -#[test] #[cfg(target_arch = "x86_64")] + +#[test] +#[cfg(target_pointer_width = "64")] fn test_hash_usize() { let val = 0xdeadbeef_deadbeef_u64; assert_eq!(hash(&(val as u64)), hash(&(val as usize))); assert!(hash(&(val as u32)) != hash(&(val as usize))); } -#[test] #[cfg(target_arch = "x86")] -fn test_hash_usize() { - let val = 0xdeadbeef_deadbeef_u64; - assert!(hash(&(val as u64)) != hash(&(val as usize))); - assert_eq!(hash(&(val as u32)), hash(&(val as usize))); -} #[test] fn test_hash_idempotent() { |
