Skip to content

Commit

Permalink
Fix test_arch on arm64.
Browse files Browse the repository at this point in the history
KNONVOLATILE_CONTEXT_POINTERS is not defined on arm64, it is called
KNONVOLATILE_CONTEXT_POINTERS_ARM64 there instead.  Add a test covering
that on ARM64 instead.
  • Loading branch information
jeremyd2019 committed Apr 8, 2024
1 parent 879c0cf commit 35f55bc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/tests/arch/tests/sys.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
use windows_sys::Win32::System::Diagnostics::Debug::KNONVOLATILE_CONTEXT_POINTERS;

#[cfg(target_arch = "aarch64")]
use windows_sys::Win32::System::Diagnostics::Debug::KNONVOLATILE_CONTEXT_POINTERS_ARM64;

#[test]
#[cfg(target_arch = "aarch64")]
fn test() {
assert_eq!(160, core::mem::size_of::<KNONVOLATILE_CONTEXT_POINTERS_ARM64>());
}

#[test]
#[cfg(target_arch = "x86_64")]
fn test() {
Expand Down
10 changes: 10 additions & 0 deletions crates/tests/arch/tests/win.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
use windows::Win32::System::Diagnostics::Debug::KNONVOLATILE_CONTEXT_POINTERS;

#[cfg(target_arch = "aarch64")]
use windows::Win32::System::Diagnostics::Debug::KNONVOLATILE_CONTEXT_POINTERS_ARM64;

#[test]
#[cfg(target_arch = "aarch64")]
fn test() {
assert_eq!(160, core::mem::size_of::<KNONVOLATILE_CONTEXT_POINTERS_ARM64>());
}

#[test]
#[cfg(target_arch = "x86_64")]
fn test() {
Expand Down

0 comments on commit 35f55bc

Please sign in to comment.