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
9cb38a4a
Commit
9cb38a4a
authored
Mar 12, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmloader: Add COM tests for DirectMusicLoader.
parent
82f771e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
loader.c
dlls/dmloader/tests/loader.c
+36
-0
No files found.
dlls/dmloader/tests/loader.c
View file @
9cb38a4a
...
...
@@ -134,6 +134,41 @@ static void test_simple_playing(void)
IDirectMusicLoader8_Release
(
loader
);
}
static
void
test_COM
(
void
)
{
IDirectMusicLoader8
*
dml8
=
(
IDirectMusicLoader8
*
)
0xdeadbeef
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicLoader
,
(
IUnknown
*
)
&
dml8
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dml8
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicLoader create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dml8
,
"dml8 = %p
\n
"
,
dml8
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicLoader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dml8
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicLoader create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicLoader interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicLoader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicLoader8
,
(
void
**
)
&
dml8
);
ok
(
hr
==
S_OK
,
"DirectMusicLoader create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicLoader8_AddRef
(
dml8
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicLoader8_QueryInterface
(
dml8
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
ok
(
refcount
==
4
,
"refcount == %u, expected 4
\n
"
,
refcount
);
refcount
=
IUnknown_Release
(
unk
);
while
(
IDirectMusicLoader8_Release
(
dml8
));
}
START_TEST
(
loader
)
{
CoInitialize
(
NULL
);
...
...
@@ -146,5 +181,6 @@ START_TEST(loader)
}
test_release_object
();
test_simple_playing
();
test_COM
();
CoUninitialize
();
}
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