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
42470bae
Commit
42470bae
authored
Dec 03, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Test SetSurfaceDesc and Lock interaction.
parent
5e43ee25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+14
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+14
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+15
-0
No files found.
dlls/ddraw/tests/ddraw2.c
View file @
42470bae
...
...
@@ -4467,7 +4467,21 @@ static void test_set_surface_desc(void)
/* Redundantly setting the same lpSurface is not an error. */
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
&
ddsd
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set surface desc, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface3_GetSurfaceDesc
(
surface3
,
&
ddsd
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
NULL
,
"lpSurface is %p, expected NULL.
\n
"
,
ddsd
.
lpSurface
);
hr
=
IDirectDrawSurface3_Lock
(
surface3
,
NULL
,
&
ddsd
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock surface, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
data
,
"lpSurface is %p, expected %p.
\n
"
,
data
,
data
);
hr
=
IDirectDrawSurface3_Unlock
(
surface3
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, hr %#x.
\n
"
,
hr
);
reset_ddsd
(
&
ddsd
);
ddsd
.
dwFlags
=
DDSD_LPSURFACE
;
ddsd
.
lpSurface
=
data
;
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
42470bae
...
...
@@ -5068,7 +5068,21 @@ static void test_set_surface_desc(void)
/* Redundantly setting the same lpSurface is not an error. */
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
&
ddsd
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set surface desc, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_GetSurfaceDesc
(
surface
,
&
ddsd
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
NULL
,
"lpSurface is %p, expected NULL.
\n
"
,
ddsd
.
lpSurface
);
hr
=
IDirectDrawSurface4_Lock
(
surface
,
NULL
,
&
ddsd
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock surface, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
data
,
"lpSurface is %p, expected %p.
\n
"
,
data
,
data
);
hr
=
IDirectDrawSurface4_Unlock
(
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, hr %#x.
\n
"
,
hr
);
reset_ddsd
(
&
ddsd
);
ddsd
.
dwFlags
=
DDSD_LPSURFACE
;
ddsd
.
lpSurface
=
data
;
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
42470bae
...
...
@@ -4956,6 +4956,21 @@ static void test_set_surface_desc(void)
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
&
ddsd
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set surface desc, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
surface
,
&
ddsd
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
NULL
,
"lpSurface is %p, expected NULL.
\n
"
,
ddsd
.
lpSurface
);
hr
=
IDirectDrawSurface7_Lock
(
surface
,
NULL
,
&
ddsd
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock surface, hr %#x.
\n
"
,
hr
);
ok
(
!
(
ddsd
.
dwFlags
&
DDSD_LPSURFACE
),
"DDSD_LPSURFACE is set.
\n
"
);
ok
(
ddsd
.
lpSurface
==
data
,
"lpSurface is %p, expected %p.
\n
"
,
data
,
data
);
hr
=
IDirectDrawSurface7_Unlock
(
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, hr %#x.
\n
"
,
hr
);
reset_ddsd
(
&
ddsd
);
ddsd
.
dwFlags
=
DDSD_LPSURFACE
;
ddsd
.
lpSurface
=
data
;
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
...
...
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