From 77b6d8e39a3e8aa881bf01204db9edd726b94616 Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Wed, 20 Sep 2023 23:08:36 -0700 Subject: [PATCH] update tests --- crates/samples/windows/direct3d12/src/main.rs | 2 +- crates/tests/reserved/tests/win.rs | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/samples/windows/direct3d12/src/main.rs b/crates/samples/windows/direct3d12/src/main.rs index 653af7c95b5..b5a8ca137bf 100644 --- a/crates/samples/windows/direct3d12/src/main.rs +++ b/crates/samples/windows/direct3d12/src/main.rs @@ -183,7 +183,7 @@ fn get_hardware_adapter(factory: &IDXGIFactory4) -> Result { let mut desc = Default::default(); unsafe { adapter.GetDesc1(&mut desc)? }; - if (DXGI_ADAPTER_FLAG(desc.Flags) & DXGI_ADAPTER_FLAG_SOFTWARE) != DXGI_ADAPTER_FLAG_NONE { + if (DXGI_ADAPTER_FLAG(desc.Flags as i32) & DXGI_ADAPTER_FLAG_SOFTWARE) != DXGI_ADAPTER_FLAG_NONE { // Don't select the Basic Render Driver adapter. If you want a // software adapter, pass in "/warp" on the command line. continue; diff --git a/crates/tests/reserved/tests/win.rs b/crates/tests/reserved/tests/win.rs index 48c45dbb76c..706aaf5083a 100644 --- a/crates/tests/reserved/tests/win.rs +++ b/crates/tests/reserved/tests/win.rs @@ -10,16 +10,18 @@ fn test() -> Result<()> { assert_eq!(InSendMessageEx(None), ISMEX_NOSEND); assert!(CreateThreadpool(None).0 != 0); - TrackPopupMenu( - HMENU(0), - TPM_LEFTBUTTON, - 1, - 2, - 0, - HWND(0), - Default::default(), - ) - .unwrap_err(); + assert_eq!( + TrackPopupMenu( + HMENU(0), + TPM_LEFTBUTTON, + 1, + 2, + 0, + HWND(0), + Default::default(), + ), + FALSE + ); let mut key = HKEY::default(); RegOpenKeyExA(HKEY_CLASSES_ROOT, s!(r".txt"), 0, KEY_QUERY_VALUE, &mut key)?;