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
637fd373
Commit
637fd373
authored
Sep 29, 2010
by
Stefan Leichter
Committed by
Alexandre Julliard
Sep 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Added more tests for SetupDiGetINFClassA.
parent
ddb033b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
devinst.c
dlls/setupapi/tests/devinst.c
+23
-0
No files found.
dlls/setupapi/tests/devinst.c
View file @
637fd373
...
...
@@ -1443,11 +1443,32 @@ static void testSetupDiGetINFClassA(void)
WritePrivateProfileStringA
(
"Version"
,
"Class"
,
"WINE"
,
filename
);
count
=
0xdeadbeef
;
retval
=
SetupDiGetINFClassA
(
filename
,
&
guid
,
cn
,
MAX_PATH
,
&
count
);
ok
(
retval
,
"expected SetupDiGetINFClassA to succeed! error %u
\n
"
,
GetLastError
());
ok
(
count
==
5
,
"expected count==5, got %u
\n
"
,
count
);
count
=
0xdeadbeef
;
retval
=
SetupDiGetINFClassA
(
filename
,
&
guid
,
cn
,
5
,
&
count
);
ok
(
retval
,
"expected SetupDiGetINFClassA to succeed! error %u
\n
"
,
GetLastError
());
ok
(
count
==
5
,
"expected count==5, got %u
\n
"
,
count
);
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
retval
=
SetupDiGetINFClassA
(
filename
,
&
guid
,
cn
,
4
,
&
count
);
ok
(
!
retval
,
"expected SetupDiGetINFClassA to fail!
\n
"
);
ok
(
ERROR_INSUFFICIENT_BUFFER
==
GetLastError
(),
"expected error ERROR_INSUFFICIENT_BUFFER, got %u
\n
"
,
GetLastError
());
ok
(
count
==
5
,
"expected count==5, got %u
\n
"
,
count
);
/* invalid parameter */
SetLastError
(
0xdeadbeef
);
retval
=
SetupDiGetINFClassA
(
NULL
,
&
guid
,
cn
,
MAX_PATH
,
&
count
);
ok
(
!
retval
,
"expected SetupDiGetINFClassA to fail!
\n
"
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
(),
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
retval
=
SetupDiGetINFClassA
(
filename
,
NULL
,
cn
,
MAX_PATH
,
&
count
);
ok
(
!
retval
,
"expected SetupDiGetINFClassA to fail!
\n
"
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
(),
...
...
@@ -1485,8 +1506,10 @@ static void testSetupDiGetINFClassA(void)
"{4d36e972-e325-11ce-bfc1-08002be10318}"
,
filename
);
/* this test succeeds only if the guid is known to the system */
count
=
0xdeadbeef
;
retval
=
SetupDiGetINFClassA
(
filename
,
&
guid
,
cn
,
MAX_PATH
,
&
count
);
ok
(
retval
,
"expected SetupDiGetINFClassA to succeed! error %u
\n
"
,
GetLastError
());
ok
(
count
==
4
,
"expected count==4, got %u(%s)
\n
"
,
count
,
cn
);
DeleteFileA
(
filename
);
}
...
...
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