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
dc184b52
Commit
dc184b52
authored
Jan 09, 2014
by
Erich E. Hoover
Committed by
Alexandre Julliard
Jan 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Test DirectDrawEnumerateEx with DDENUM_ATTACHEDSECONDARYDEVICES.
parent
eba5132b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+29
-0
No files found.
dlls/ddraw/tests/ddrawmodes.c
View file @
dc184b52
...
...
@@ -209,8 +209,22 @@ static BOOL WINAPI test_context_callbackExA(GUID *lpGUID, char *lpDriverDescript
return
TRUE
;
}
static
BOOL
WINAPI
test_count_callbackExA
(
GUID
*
lpGUID
,
char
*
lpDriverDescription
,
char
*
lpDriverName
,
void
*
lpContext
,
HMONITOR
hm
)
{
DWORD
*
count
=
(
DWORD
*
)
lpContext
;
trace
(
"test_count_callbackExA: %p %s %s %p %p
\n
"
,
lpGUID
,
lpDriverDescription
,
lpDriverName
,
lpContext
,
hm
);
(
*
count
)
++
;
return
TRUE
;
}
static
void
test_DirectDrawEnumerateExA
(
void
)
{
DWORD
callbackCount
;
HRESULT
ret
;
if
(
!
pDirectDrawEnumerateExA
)
...
...
@@ -237,6 +251,21 @@ static void test_DirectDrawEnumerateExA(void)
ret
=
pDirectDrawEnumerateExA
(
test_context_callbackExA
,
(
void
*
)
0xdeadbeef
,
0
);
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
/* Test with valid callback parameter and count the number of primary devices */
callbackCount
=
0
;
ret
=
pDirectDrawEnumerateExA
(
test_count_callbackExA
,
&
callbackCount
,
0
);
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
ok
(
callbackCount
==
1
,
"Expected 1 primary device, got %d
\n
"
,
callbackCount
);
/* Test with valid callback parameter and count the number of secondary devices */
callbackCount
=
0
;
ret
=
pDirectDrawEnumerateExA
(
test_count_callbackExA
,
&
callbackCount
,
DDENUM_ATTACHEDSECONDARYDEVICES
);
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
/* Note: this list includes the primary devices as well and some systems (such as the TestBot)
do not include any secondary devices */
ok
(
callbackCount
>=
1
,
"Expected at least one device, got %d
\n
"
,
callbackCount
);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */
trace
(
"Calling DirectDrawEnumerateExA with all flags set and NULL context.
\n
"
);
ret
=
pDirectDrawEnumerateExA
(
test_nullcontext_callbackExA
,
NULL
,
...
...
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