Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a9f72a30
Commit
a9f72a30
authored
Jun 21, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Test ddraw surface reference counts a bit more.
parent
104e68da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+21
-0
No files found.
dlls/ddraw/tests/dsurface.c
View file @
a9f72a30
...
...
@@ -1053,6 +1053,7 @@ static void IFaceRefCount(void)
HRESULT
ret
;
IDirectDrawSurface2
*
surf2
;
IDirectDrawSurface2
*
surf2a
;
IDirectDrawSurface3
*
surf3
;
IDirectDrawSurface4
*
surf4
;
IDirectDrawSurface7
*
surf7a
;
IDirectDrawSurface7
*
surf7b
;
...
...
@@ -1089,6 +1090,10 @@ static void IFaceRefCount(void)
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
IDirectDrawSurface_QueryInterface
(
surf
,
&
IID_IDirectDrawSurface3
,
(
void
**
)
&
surf3
);
ref
=
getRefcount
((
IUnknown
*
)
surf3
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
IDirectDrawSurface_QueryInterface
(
surf
,
&
IID_IDirectDrawSurface4
,
(
void
**
)
&
surf4
);
ref
=
getRefcount
((
IUnknown
*
)
surf4
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
...
...
@@ -1142,6 +1147,9 @@ static void IFaceRefCount(void)
ref
=
IDirectDrawSurface2_Release
(
surf2a
);
/* Release the other */
todo_wine
ok
(
ref
==
0
,
"Refcount is %u, expected 0
\n
"
,
ref
);
ref
=
IDirectDrawSurface3_Release
(
surf3
);
todo_wine
ok
(
ref
==
0
,
"Refcount is %u, expected 0
\n
"
,
ref
);
ref
=
IDirectDrawSurface4_Release
(
surf4
);
todo_wine
ok
(
ref
==
0
,
"Refcount is %u, expected 0
\n
"
,
ref
);
...
...
@@ -3080,6 +3088,7 @@ static void GetDCTest(void)
IDirectDraw4
*
dd4
;
IDirectDraw7
*
dd7
;
HDC
dc
;
ULONG
ref
;
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
...
...
@@ -3125,6 +3134,11 @@ static void GetDCTest(void)
hr
=
IDirectDrawSurface4_QueryInterface
(
surf4
,
&
IID_IDirectDrawSurface
,
(
void
**
)
&
surf
);
ok
(
SUCCEEDED
(
hr
),
"QueryInterface failed, hr %#x.
\n
"
,
hr
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf4
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
hr
=
IDirectDrawSurface4_GetDC
(
surf4
,
&
dc
);
ok
(
SUCCEEDED
(
hr
),
"GetDC failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -3135,6 +3149,13 @@ static void GetDCTest(void)
ok
(
SUCCEEDED
(
hr
),
"GetSurfaceFromDC failed, hr %#x.
\n
"
,
hr
);
ok
(
tmp
==
surf
,
"Expected surface %p, got %p.
\n\n
"
,
surf
,
tmp
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
tmp
);
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf4
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
hr
=
IDirectDrawSurface4_ReleaseDC
(
surf4
,
dc
);
ok
(
SUCCEEDED
(
hr
),
"ReleaseDC failed, hr %#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