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
d3a3deb6
Commit
d3a3deb6
authored
Jan 16, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmcompos/tests: Add COM tests for DirectMusicTemplate.
parent
7c7c427c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
dmcompos.c
dlls/dmcompos/tests/dmcompos.c
+41
-0
No files found.
dlls/dmcompos/tests/dmcompos.c
View file @
d3a3deb6
...
...
@@ -126,6 +126,46 @@ static void test_COM_chordmap(void)
while
(
IDirectMusicChordMap_Release
(
dmcm
));
}
static
void
test_COM_template
(
void
)
{
IPersistStream
*
ps
=
(
IPersistStream
*
)
0xdeadbeef
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicTemplate
,
(
IUnknown
*
)
&
ps
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
ps
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicTemplate create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
ps
,
"ps = %p
\n
"
,
ps
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicTemplate
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
ps
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicTemplate create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicTemplate interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicTemplate
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
todo_wine
ok
(
hr
==
S_OK
,
"DirectMusicTemplate create failed: %08x, expected S_OK
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
skip
(
"DirectMusicTemplate not implemented
\n
"
);
return
;
}
refcount
=
IPersistStream_AddRef
(
ps
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IPersistStream_QueryInterface
(
ps
,
&
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
(
IPersistStream_Release
(
ps
));
}
static
void
test_COM_track
(
void
)
{
IDirectMusicTrack8
*
dmt8
;
...
...
@@ -202,6 +242,7 @@ START_TEST(dmcompos)
}
test_COM
();
test_COM_chordmap
();
test_COM_template
();
test_COM_track
();
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