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
f6e0e181
Commit
f6e0e181
authored
Mar 10, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Show that a failing SetPrivateData call does not clear the old contents.
parent
b71c4f00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+17
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+17
-0
No files found.
dlls/ddraw/tests/ddraw4.c
View file @
f6e0e181
...
...
@@ -6072,6 +6072,23 @@ static void test_private_data(void)
sizeof
(
ddraw
)
*
2
,
DDSPD_IUNKNOWNPOINTER
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Got unexpected hr %#x.
\n
"
,
hr
);
/* Note that with a size != 0 and size != sizeof(IUnknown *) and
* DDSPD_IUNKNOWNPOINTER set SetPrivateData in ddraw4 and ddraw7
* erases the old content and returns an error. This behavior has
* been fixed in d3d8 and d3d9. Unless an application is found
* that depends on this we don't care about this behavior. */
hr
=
IDirectDrawSurface4_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
sizeof
(
ddraw
),
DDSPD_IUNKNOWNPOINTER
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set private data, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
0
,
DDSPD_IUNKNOWNPOINTER
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Got unexpected hr %#x.
\n
"
,
hr
);
size
=
sizeof
(
ptr
);
hr
=
IDirectDrawSurface4_GetPrivateData
(
surface
,
&
IID_IDirect3D
,
&
ptr
,
&
size
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get private data, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_FreePrivateData
(
surface
,
&
IID_IDirect3D
);
ok
(
SUCCEEDED
(
hr
),
"Failed to free private data, hr %#x.
\n
"
,
hr
);
refcount
=
get_refcount
((
IUnknown
*
)
ddraw
);
hr
=
IDirectDrawSurface4_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
sizeof
(
ddraw
),
DDSPD_IUNKNOWNPOINTER
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
f6e0e181
...
...
@@ -5927,6 +5927,23 @@ static void test_private_data(void)
sizeof
(
ddraw
)
*
2
,
DDSPD_IUNKNOWNPOINTER
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Got unexpected hr %#x.
\n
"
,
hr
);
/* Note that with a size != 0 and size != sizeof(IUnknown *) and
* DDSPD_IUNKNOWNPOINTER set SetPrivateData in ddraw4 and ddraw7
* erases the old content and returns an error. This behavior has
* been fixed in d3d8 and d3d9. Unless an application is found
* that depends on this we don't care about this behavior. */
hr
=
IDirectDrawSurface7_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
sizeof
(
ddraw
),
DDSPD_IUNKNOWNPOINTER
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set private data, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
0
,
DDSPD_IUNKNOWNPOINTER
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Got unexpected hr %#x.
\n
"
,
hr
);
size
=
sizeof
(
ptr
);
hr
=
IDirectDrawSurface7_GetPrivateData
(
surface
,
&
IID_IDirect3D
,
&
ptr
,
&
size
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get private data, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_FreePrivateData
(
surface
,
&
IID_IDirect3D
);
ok
(
SUCCEEDED
(
hr
),
"Failed to free private data, hr %#x.
\n
"
,
hr
);
refcount
=
get_refcount
((
IUnknown
*
)
ddraw
);
hr
=
IDirectDrawSurface7_SetPrivateData
(
surface
,
&
IID_IDirect3D
,
ddraw
,
sizeof
(
ddraw
),
DDSPD_IUNKNOWNPOINTER
);
...
...
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