Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b0582743
Commit
b0582743
authored
Jul 02, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.devices.bluetooth/tests: Add IBluetoothAdapterStatics::GetDeviceSelector() tests.
parent
5e942086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
bluetooth.c
dlls/windows.devices.bluetooth/tests/bluetooth.c
+25
-1
No files found.
dlls/windows.devices.bluetooth/tests/bluetooth.c
View file @
b0582743
...
@@ -34,6 +34,15 @@
...
@@ -34,6 +34,15 @@
#include "wine/test.h"
#include "wine/test.h"
const
char
*
debugstr_hstring
(
HSTRING
hstr
)
{
const
WCHAR
*
str
;
UINT32
len
;
if
(
hstr
&&
!
((
ULONG_PTR
)
hstr
>>
16
))
return
"(invalid)"
;
str
=
WindowsGetStringRawBuffer
(
hstr
,
&
len
);
return
wine_dbgstr_wn
(
str
,
len
);
}
#define check_interface( obj, iid ) check_interface_( __LINE__, obj, iid )
#define check_interface( obj, iid ) check_interface_( __LINE__, obj, iid )
static
void
check_interface_
(
unsigned
int
line
,
void
*
obj
,
const
IID
*
iid
)
static
void
check_interface_
(
unsigned
int
line
,
void
*
obj
,
const
IID
*
iid
)
{
{
...
@@ -48,11 +57,14 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
...
@@ -48,11 +57,14 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
static
void
test_BluetoothAdapterStatics
(
void
)
static
void
test_BluetoothAdapterStatics
(
void
)
{
{
static
const
WCHAR
*
default_res
=
L"System.Devices.InterfaceClassGuid:=
\"
{92383B0E-F90E-4AC9-8D44-8C2D0D0EBDA2}
\"
"
L"AND System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True"
;
static
const
WCHAR
*
bluetoothadapter_statics_name
=
L"Windows.Devices.Bluetooth.BluetoothAdapter"
;
static
const
WCHAR
*
bluetoothadapter_statics_name
=
L"Windows.Devices.Bluetooth.BluetoothAdapter"
;
IBluetoothAdapterStatics
*
bluetoothadapter_statics
;
IBluetoothAdapterStatics
*
bluetoothadapter_statics
;
IActivationFactory
*
factory
;
IActivationFactory
*
factory
;
HSTRING
str
;
HSTRING
str
,
default_str
;
HRESULT
hr
;
HRESULT
hr
;
INT32
res
;
LONG
ref
;
LONG
ref
;
hr
=
WindowsCreateString
(
bluetoothadapter_statics_name
,
wcslen
(
bluetoothadapter_statics_name
),
&
str
);
hr
=
WindowsCreateString
(
bluetoothadapter_statics_name
,
wcslen
(
bluetoothadapter_statics_name
),
&
str
);
...
@@ -74,6 +86,18 @@ static void test_BluetoothAdapterStatics(void)
...
@@ -74,6 +86,18 @@ static void test_BluetoothAdapterStatics(void)
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IBluetoothAdapterStatics
,
(
void
**
)
&
bluetoothadapter_statics
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IBluetoothAdapterStatics
,
(
void
**
)
&
bluetoothadapter_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IBluetoothAdapterStatics_GetDeviceSelector
(
bluetoothadapter_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IBluetoothAdapterStatics_GetDeviceSelector
(
bluetoothadapter_statics
,
&
str
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCreateString
(
default_res
,
wcslen
(
default_res
),
&
default_str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCompareStringOrdinal
(
str
,
default_str
,
&
res
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
res
,
"got unexpected string %s.
\n
"
,
debugstr_hstring
(
str
)
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
default_str
);
ref
=
IBluetoothAdapterStatics_Release
(
bluetoothadapter_statics
);
ref
=
IBluetoothAdapterStatics_Release
(
bluetoothadapter_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ref
=
IActivationFactory_Release
(
factory
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment