Files
rust/library/std/src/sys/windows/alloc/tests.rs
Christiaan Dirkx 0dbed6161a Rework std::sys::windows::alloc
Add documentation to the system functions and `SAFETY` comments.
Refactored helper functions, fixing the correctness of `get_header`.
2021-03-26 12:38:26 +01:00

10 lines
248 B
Rust

use super::{Header, MIN_ALIGN};
use crate::mem;
#[test]
fn alloc_header() {
// Header must fit in the padding before an aligned pointer
assert!(mem::size_of::<Header>() <= MIN_ALIGN);
assert!(mem::align_of::<Header>() <= MIN_ALIGN);
}