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
4c4a4145
Commit
4c4a4145
authored
Nov 04, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Check for multiple expected messages in test_wndproc().
parent
51b2bde3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
d3d.c
dlls/ddraw/tests/d3d.c
+13
-5
No files found.
dlls/ddraw/tests/d3d.c
View file @
4c4a4145
...
...
@@ -3252,11 +3252,11 @@ static void SetRenderTargetTest(void)
IDirectDrawSurface7_Release
(
failrt
);
}
static
UINT
expect_message
;
static
const
UINT
*
expect_messages
;
static
LRESULT
CALLBACK
test_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
)
{
if
(
expect_message
&&
message
==
expect_message
)
expect_message
=
0
;
if
(
expect_message
s
&&
message
==
*
expect_messages
)
++
expect_messages
;
return
DefWindowProcA
(
hwnd
,
message
,
wparam
,
lparam
);
}
...
...
@@ -3270,6 +3270,13 @@ static void test_wndproc(void)
HRESULT
hr
;
ULONG
ref
;
static
const
UINT
messages
[]
=
{
WM_ACTIVATE
,
WM_SETFOCUS
,
0
,
};
hr
=
pDirectDrawCreateEx
(
NULL
,
(
void
**
)
&
ddraw7
,
&
IID_IDirectDraw7
,
NULL
);
if
(
FAILED
(
hr
))
{
...
...
@@ -3288,7 +3295,7 @@ static void test_wndproc(void)
ok
(
proc
==
(
LONG_PTR
)
test_proc
,
"Expected wndproc %#lx, got %#lx.
\n
"
,
(
LONG_PTR
)
test_proc
,
proc
);
expect_message
=
WM_SETFOCUS
;
expect_message
s
=
messages
;
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw7
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -3298,7 +3305,8 @@ static void test_wndproc(void)
goto
done
;
}
ok
(
!
expect_message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_message
);
ok
(
!*
expect_messages
,
"Expected message %#x, but didn't receive it.
\n
"
,
*
expect_messages
);
expect_messages
=
NULL
;
proc
=
GetWindowLongPtrA
(
window
,
GWLP_WNDPROC
);
ok
(
proc
!=
(
LONG_PTR
)
test_proc
,
"Expected wndproc != %#lx, got %#lx.
\n
"
,
...
...
@@ -3342,7 +3350,7 @@ static void test_wndproc(void)
(
LONG_PTR
)
DefWindowProcA
,
proc
);
done:
expect_message
=
0
;
expect_message
s
=
NULL
;
DestroyWindow
(
window
);
UnregisterClassA
(
"d3d7_test_wndproc_wc"
,
GetModuleHandleA
(
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