Skip to content

Commit 858e82b

Browse files
committed
Disable normal HashMap test on OS X
Implementing random number generation on OS X will require special-casing the 'openat' system call to special-case reading from /dev/urandom
1 parent 6d3e93c commit 858e82b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/run-pass/hashmap.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
2828

2929
fn main() {
3030
let _map : HashMap<i32, i32, BuildHasherDefault<collections::hash_map::DefaultHasher>> = Default::default();
31-
let map_normal: HashMap<i32, i32> = HashMap::new();
3231

33-
test_map(map_normal);
32+
// TODO: Implement random number generation on OS X
33+
if cfg!(not(target_os = "darwin")) {
34+
let map_normal: HashMap<i32, i32> = HashMap::new();
35+
test_map(map_normal);
36+
} else {
37+
test_map(_map);
38+
}
3439
}

0 commit comments

Comments
 (0)