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
d306f596
Commit
d306f596
authored
Mar 01, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox/tests: Add tests for Win32_VideoController.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
854482c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
query.c
dlls/wbemprox/tests/query.c
+76
-0
No files found.
dlls/wbemprox/tests/query.c
View file @
d306f596
...
@@ -1556,6 +1556,81 @@ static void test_Win32_Processor( IWbemServices *services )
...
@@ -1556,6 +1556,81 @@ static void test_Win32_Processor( IWbemServices *services )
SysFreeString
(
wql
);
SysFreeString
(
wql
);
}
}
static
void
test_Win32_VideoController
(
IWbemServices
*
services
)
{
static
const
WCHAR
configmanagererrorcodeW
[]
=
{
'C'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
'M'
,
'a'
,
'n'
,
'a'
,
'g'
,
'e'
,
'r'
,
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
driverdateW
[]
=
{
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
'D'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
installeddisplaydriversW
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
statusW
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
static
const
WCHAR
queryW
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'V'
,
'i'
,
'd'
,
'e'
,
'o'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
BSTR
wql
=
SysAllocString
(
wqlW
),
query
=
SysAllocString
(
queryW
);
IEnumWbemClassObject
*
result
;
IWbemClassObject
*
obj
;
VARIANT
val
;
CIMTYPE
type
;
HRESULT
hr
;
DWORD
count
;
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
if
(
hr
!=
S_OK
)
{
win_skip
(
"Win32_VideoController not available
\n
"
);
return
;
}
for
(;;)
{
hr
=
IEnumWbemClassObject_Next
(
result
,
10000
,
1
,
&
obj
,
&
count
);
if
(
hr
!=
S_OK
)
break
;
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
configmanagererrorcodeW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_I4
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_UINT32
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"configmanagererrorcode %d
\n
"
,
V_I4
(
&
val
)
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
driverdateW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_DATETIME
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"driverdate %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
installeddisplaydriversW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
||
V_VT
(
&
val
)
==
VT_NULL
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"installeddisplaydrivers %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
statusW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"status %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
IWbemClassObject_Release
(
obj
);
}
SysFreeString
(
query
);
SysFreeString
(
wql
);
}
START_TEST
(
query
)
START_TEST
(
query
)
{
{
static
const
WCHAR
cimv2W
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'\\'
,
'C'
,
'I'
,
'M'
,
'V'
,
'2'
,
0
};
static
const
WCHAR
cimv2W
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'\\'
,
'C'
,
'I'
,
'M'
,
'V'
,
'2'
,
0
};
...
@@ -1598,6 +1673,7 @@ START_TEST(query)
...
@@ -1598,6 +1673,7 @@ START_TEST(query)
test_PhysicalMemory
(
services
);
test_PhysicalMemory
(
services
);
test_IP4RouteTable
(
services
);
test_IP4RouteTable
(
services
);
test_Win32_Processor
(
services
);
test_Win32_Processor
(
services
);
test_Win32_VideoController
(
services
);
SysFreeString
(
path
);
SysFreeString
(
path
);
IWbemServices_Release
(
services
);
IWbemServices_Release
(
services
);
...
...
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