tweak entropy tests a bit

This commit is contained in:
Ralf Jung 2019-04-16 19:06:08 +02:00
parent 7c06679f93
commit ceca7c5020
2 changed files with 7 additions and 6 deletions

View 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;

View 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);
}
}