about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/tests/hash/sip.rs14
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() {