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
f65c6af3
Commit
f65c6af3
authored
Apr 09, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx/tests: Add DirectPlayLobby COM tests.
parent
b669664c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
dplayx.c
dlls/dplayx/tests/dplayx.c
+79
-0
No files found.
dlls/dplayx/tests/dplayx.c
View file @
f65c6af3
...
...
@@ -6453,12 +6453,91 @@ static void test_COM(void)
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
}
static
void
test_COM_dplobby
(
void
)
{
IDirectPlayLobby
*
dpl
=
(
IDirectPlayLobby
*
)
0xdeadbeef
;
IDirectPlayLobbyA
*
dplA
;
IDirectPlayLobby2A
*
dpl2A
;
IDirectPlayLobby2
*
dpl2
;
IDirectPlayLobby3A
*
dpl3A
;
IDirectPlayLobby3
*
dpl3
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayLobby
,
(
IUnknown
*
)
&
dpl
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dpl
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
||
broken
(
hr
==
E_INVALIDARG
),
"DirectPlayLobby create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dpl
||
dpl
==
(
IDirectPlayLobby
*
)
0xdeadbeef
,
"dp4 = %p
\n
"
,
dpl
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayLobby
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlay
,
(
void
**
)
&
dpl
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectPlayLobby create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Different refcount for all DirectPlayLobby Interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayLobby
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlayLobby
,
(
void
**
)
&
dpl
);
ok
(
hr
==
S_OK
,
"DirectPlayLobby create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dpl
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectPlayLobby_QueryInterface
(
dpl
,
&
IID_IDirectPlayLobbyA
,
(
void
**
)
&
dplA
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlayLobbyA failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dplA
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
dplA
);
hr
=
IDirectPlayLobby_QueryInterface
(
dpl
,
&
IID_IDirectPlayLobby2
,
(
void
**
)
&
dpl2
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlayLobby2 failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dpl2
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
dpl2
);
hr
=
IDirectPlayLobby_QueryInterface
(
dpl
,
&
IID_IDirectPlayLobby2A
,
(
void
**
)
&
dpl2A
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlayLobby2A failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dpl2A
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
dpl2A
);
hr
=
IDirectPlayLobby_QueryInterface
(
dpl
,
&
IID_IDirectPlayLobby3
,
(
void
**
)
&
dpl3
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlayLobby3 failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dpl3
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
dpl3
);
hr
=
IDirectPlayLobby_QueryInterface
(
dpl
,
&
IID_IDirectPlayLobby3A
,
(
void
**
)
&
dpl3A
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlayLobby3A failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
dpl3A
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
dpl3A
);
/* IDirectPlayLobby and IUnknown share a refcount */
hr
=
IDirectPlayX_QueryInterface
(
dpl
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayLobby_AddRef
(
unk
);
todo_wine
ok
(
refcount
==
4
,
"refcount == %u, expected 4
\n
"
,
refcount
);
IDirectPlayLobby_Release
(
unk
);
IUnknown_Release
(
unk
);
IDirectPlayLobby_Release
(
dpl3
);
IDirectPlayLobby_Release
(
dpl3A
);
IDirectPlayLobby_Release
(
dpl2
);
IDirectPlayLobby_Release
(
dpl2A
);
IDirectPlayLobby_Release
(
dpl
);
refcount
=
IDirectPlayLobby_Release
(
dpl
);
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
}
START_TEST
(
dplayx
)
{
CoInitialize
(
NULL
);
test_COM
();
test_COM_dplobby
();
if
(
!
winetest_interactive
)
{
...
...
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