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
37582055
Commit
37582055
authored
May 27, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
May 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Add another test.
parent
5db7fd37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
devinst.c
dlls/setupapi/tests/devinst.c
+10
-1
No files found.
dlls/setupapi/tests/devinst.c
View file @
37582055
...
...
@@ -404,12 +404,21 @@ static void testCreateDeviceInfo(void)
{
SP_DEVINFO_DATA
devInfo
=
{
0
};
DWORD
i
;
static
GUID
deadbeef
=
{
0xdeadbeef
,
0xdead
,
0xbeef
,
{
0xde
,
0xad
,
0xbe
,
0xef
,
0xde
,
0xad
,
0xbe
,
0xef
}};
/* No GUID given */
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"Root
\\
LEGACY_BOGUS
\\
0000"
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %08x
\n
"
,
GetLastError
());
/* We can't add device information to the set with a different GUID */
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"Root
\\
LEGACY_BOGUS
\\
0000"
,
&
deadbeef
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_CLASS_MISMATCH
,
"Expected ERROR_CLASS_MISMATCH, got %08x
\n
"
,
GetLastError
());
/* Finally, with all three required parameters, this succeeds: */
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"Root
\\
LEGACY_BOGUS
\\
0000"
,
&
guid
,
NULL
,
NULL
,
0
,
NULL
);
...
...
@@ -426,10 +435,10 @@ static void testCreateDeviceInfo(void)
DICD_GENERATE_ID
,
&
devInfo
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_USER_BUFFER
,
"Expected ERROR_INVALID_USER_BUFFER, got %08x
\n
"
,
GetLastError
());
/* and this finally succeeds. */
devInfo
.
cbSize
=
sizeof
(
devInfo
);
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"LEGACY_BOGUS"
,
&
guid
,
NULL
,
NULL
,
DICD_GENERATE_ID
,
&
devInfo
);
/* and this finally succeeds. */
ok
(
ret
,
"SetupDiCreateDeviceInfoA failed: %08x
\n
"
,
GetLastError
());
/* There were three devices added, however - the second failure just
* resulted in the SP_DEVINFO_DATA not getting copied.
...
...
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