Fix some tests

This commit is contained in:
Alex Crichton
2020-03-04 10:37:10 -08:00
parent 8cee547519
commit 84bcbd4650

View File

@@ -92,10 +92,10 @@ mod test {
use super::*;
#[test]
fn hostmemory_is_aligned() {
let mut h = HostMemory::new();
assert_eq!(h.buffer.as_mut_ptr() as usize % 4096, 0);
let mut h = Box::new(HostMemory::new());
assert_eq!(h.buffer.as_mut_ptr() as usize % 4096, 0);
let h = HostMemory::new();
assert_eq!(h.base().0 as usize % 4096, 0);
let h = Box::new(h);
assert_eq!(h.base().0 as usize % 4096, 0);
}
}