]> git.lizzy.rs Git - rust.git/commitdiff
tweak entropy tests a bit
authorRalf Jung <post@ralfj.de>
Tue, 16 Apr 2019 17:06:08 +0000 (19:06 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 16 Apr 2019 17:06:08 +0000 (19:06 +0200)
tests/compile-fail/getrandom.rs
tests/run-pass/hashmap.rs

index 4dc3e863aaaec58c0b204d036822ad3dbdea94c9..d54c95c82385c2851e07c0c89fc5d7e7fa0a134d 100644 (file)
@@ -1,5 +1,5 @@
-// ignore-macos
-// ignore-windows
+// ignore-macos: Uses Linux-only APIs
+// ignore-windows: Uses Linux-only APIs
 
 #![feature(rustc_private)]
 extern crate libc;
index b29b681939794e19a029e46b80c1913c93862265..796e63c81a412a864df0a2a0cfad832989f699f4 100644 (file)
@@ -27,12 +27,13 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
 }
 
 fn main() {
-    // TODO: Implement random number generation on OS X
     if cfg!(not(target_os = "macos")) {
-        let map_normal: HashMap<i32, i32> = HashMap::new();
-        test_map(map_normal);
+        let map: HashMap<i32, i32> = HashMap::default();
+        test_map(map);
     } else {
-        let map : HashMap<i32, i32, BuildHasherDefault<collections::hash_map::DefaultHasher>> = Default::default();
+        // TODO: Implement random number generation on OS X.
+        // Until then, use a deterministic map.
+        let map : HashMap<i32, i32, BuildHasherDefault<collections::hash_map::DefaultHasher>> = HashMap::default();
         test_map(map);
     }
 }