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
77bf52b8
Commit
77bf52b8
authored
Jan 10, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime/tests: Add COM tests for DirectMusicSegmentState.
parent
d4861c07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
dmime.c
dlls/dmime/tests/dmime.c
+41
-0
No files found.
dlls/dmime/tests/dmime.c
View file @
77bf52b8
...
...
@@ -90,6 +90,46 @@ static void test_COM_segment(void)
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
}
static
void
test_COM_segmentstate
(
void
)
{
IDirectMusicSegmentState8
*
dmss8
=
(
IDirectMusicSegmentState8
*
)
0xdeadbeef
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicSegmentState
,
(
IUnknown
*
)
&
dmss8
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dmss8
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicSegmentState8 create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dmss8
,
"dmss8 = %p
\n
"
,
dmss8
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicSegmentState
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dmss8
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicSegmentState8 create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicSegmentState interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicSegmentState
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicSegmentState8
,
(
void
**
)
&
dmss8
);
if
(
hr
==
E_NOINTERFACE
)
{
win_skip
(
"DirectMusicSegmentState without IDirectMusicSegmentState8
\n
"
);
return
;
}
ok
(
hr
==
S_OK
,
"DirectMusicSegmentState8 create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicSegmentState8_AddRef
(
dmss8
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicSegmentState8_QueryInterface
(
dmss8
,
&
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
(
IDirectMusicSegmentState8_Release
(
dmss8
));
}
START_TEST
(
dmime
)
{
CoInitialize
(
NULL
);
...
...
@@ -101,6 +141,7 @@ START_TEST(dmime)
return
;
}
test_COM_segment
();
test_COM_segmentstate
();
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