Skip to content

Commit

Permalink
Verify alignment for DEVMODEA/DEVMODEW structs (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 4, 2023
1 parent a8b3b38 commit 59950e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/tests/metadata/tests/struct_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ fn test_windows() {

assert_eq!(156, std::mem::size_of::<DEVMODEA>());
assert_eq!(220, std::mem::size_of::<DEVMODEW>());

assert_eq!(4, std::mem::align_of::<DEVMODEA>());
assert_eq!(4, std::mem::align_of::<DEVMODEW>());
}

#[test]
Expand All @@ -12,4 +15,7 @@ fn test_sys() {

assert_eq!(156, std::mem::size_of::<DEVMODEA>());
assert_eq!(220, std::mem::size_of::<DEVMODEW>());

assert_eq!(4, std::mem::align_of::<DEVMODEA>());
assert_eq!(4, std::mem::align_of::<DEVMODEW>());
}

0 comments on commit 59950e2

Please sign in to comment.