fix tests for latest Rust
This commit is contained in:
parent
d05159f3a9
commit
b08bf47606
@ -1 +1 @@
|
||||
fe0a415b4ba3310c2263f07e0253e2434310299c
|
||||
7c71bc3208031b1307573de45a3b3e18fa45787a
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![feature(
|
||||
async_await,
|
||||
await_macro,
|
||||
futures_api,
|
||||
)]
|
||||
|
||||
use std::{future::Future, pin::Pin, task::Poll, ptr};
|
||||
|
@ -7,13 +7,10 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
|
||||
map.insert(0, 0);
|
||||
assert_eq!(map.values().fold(0, |x, y| x+y), 0);
|
||||
|
||||
let table_base = map.get(&0).unwrap() as *const _;
|
||||
|
||||
let num = 22; // large enough to trigger a resize
|
||||
let num = 25;
|
||||
for i in 1..num {
|
||||
map.insert(i, i);
|
||||
}
|
||||
assert!(table_base != map.get(&0).unwrap() as *const _); // make sure relocation happened
|
||||
assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2); // check the right things are in the table now
|
||||
|
||||
// Inserting again replaces the existing entries
|
||||
|
Loading…
x
Reference in New Issue
Block a user