mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
tweak entropy tests a bit
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user