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
2259da71
Commit
2259da71
authored
Apr 02, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime/tests: Add some COM tests for IDirectMusicPerformance.
parent
0ea21942
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
performance.c
dlls/dmime/tests/performance.c
+45
-0
No files found.
dlls/dmime/tests/performance.c
View file @
2259da71
...
...
@@ -195,6 +195,50 @@ static void test_createport(void)
IDirectMusicPerformance_Release
(
perf
);
}
static
void
test_COM
(
void
)
{
IDirectMusicPerformance
*
dmp
=
(
IDirectMusicPerformance
*
)
0xdeadbeef
;
IDirectMusicPerformance
*
dmp2
;
IDirectMusicPerformance8
*
dmp8
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicPerformance
,
(
IUnknown
*
)
&
dmp
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dmp
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicPerformance create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dmp
,
"dmp = %p
\n
"
,
dmp
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicPerformance
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSound
,
(
void
**
)
&
dmp
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicPerformance create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicPerformance
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicPerformance
,
(
void
**
)
&
dmp
);
ok
(
hr
==
S_OK
,
"DirectMusicPerformance create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicPerformance_AddRef
(
dmp
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicPerformance_QueryInterface
(
dmp
,
&
IID_IDirectMusicPerformance2
,
(
void
**
)
&
dmp2
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectMusicPerformance2 failed: %08x
\n
"
,
hr
);
IDirectMusicPerformance_AddRef
(
dmp
);
refcount
=
IDirectMusicPerformance_Release
(
dmp
);
ok
(
refcount
==
3
,
"refcount == %u, expected 3
\n
"
,
refcount
);
hr
=
IDirectMusicPerformance_QueryInterface
(
dmp
,
&
IID_IDirectMusicPerformance8
,
(
void
**
)
&
dmp8
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectMusicPerformance8 failed: %08x
\n
"
,
hr
);
refcount
=
IDirectMusicPerformance_Release
(
dmp
);
ok
(
refcount
==
3
,
"refcount == %u, expected 3
\n
"
,
refcount
);
refcount
=
IDirectMusicPerformance8_Release
(
dmp8
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
refcount
=
IDirectMusicPerformance_Release
(
dmp2
);
ok
(
refcount
==
1
,
"refcount == %u, expected 1
\n
"
,
refcount
);
refcount
=
IDirectMusicPerformance_Release
(
dmp
);
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
}
START_TEST
(
performance
)
{
HRESULT
hr
;
...
...
@@ -211,6 +255,7 @@ START_TEST( performance )
return
;
}
test_COM
();
test_createport
();
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