From de1c33a788d26abfe61eec61851bcae522185f69 Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Tue, 25 Jun 2024 17:32:40 -0700 Subject: [PATCH] fix error in test case --- crates/tests/winrt/tests/collisions.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/tests/winrt/tests/collisions.rs b/crates/tests/winrt/tests/collisions.rs index 23b27794a0..482fadabf9 100644 --- a/crates/tests/winrt/tests/collisions.rs +++ b/crates/tests/winrt/tests/collisions.rs @@ -1,5 +1,5 @@ use windows::{ - core::HSTRING, + core::{imp::E_POINTER, HSTRING}, ApplicationModel::Email::EmailAttachment, Devices::WiFiDirect::{ WiFiDirectConnectionParameters, WiFiDirectDevice, WiFiDirectDeviceSelectorType, @@ -16,7 +16,10 @@ fn wifi() -> windows::core::Result<()> { assert!(!a.is_empty()); // from_id_async from IWiFiDirectDeviceStatics - assert!(WiFiDirectDevice::FromIdAsync(&a)?.get() == Err(windows::core::Error::fail())); + assert!( + WiFiDirectDevice::FromIdAsync(&a)?.get() + == Err(windows::core::Error::from_hresult(E_POINTER)) + ); // get_device_selector overload from IWiFiDirectDeviceStatics2 is renamed to get_device_selector2 let c = WiFiDirectDevice::GetDeviceSelector2(WiFiDirectDeviceSelectorType::DeviceInterface)?;