Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Sep 21, 2023
1 parent de52100 commit 77b6d8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/samples/windows/direct3d12/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fn get_hardware_adapter(factory: &IDXGIFactory4) -> Result<IDXGIAdapter1> {
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;
Expand Down
22 changes: 12 additions & 10 deletions crates/tests/reserved/tests/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit 77b6d8e

Please sign in to comment.