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
a0c0e367
Commit
a0c0e367
authored
Jan 12, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmscript/tests: Add COM tests for DirectMusicScriptTrack.
parent
7b3c6307
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
dmscript.c
dlls/dmscript/tests/dmscript.c
+44
-0
No files found.
dlls/dmscript/tests/dmscript.c
View file @
a0c0e367
...
...
@@ -132,6 +132,49 @@ static void test_COM(void)
while
(
IDirectMusicScript_Release
(
dms
));
}
static
void
test_COM_scripttrack
(
void
)
{
IDirectMusicTrack
*
dmt
;
IPersistStream
*
ps
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicScriptTrack
,
(
IUnknown
*
)
&
dmt
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dmt
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicScriptTrack create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dmt
,
"dmt = %p
\n
"
,
dmt
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicScriptTrack
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dmt
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicScriptTrack create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicScriptTrack interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicScriptTrack
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicTrack
,
(
void
**
)
&
dmt
);
ok
(
hr
==
S_OK
,
"DirectMusicScriptTrack create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicTrack_AddRef
(
dmt
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicTrack_QueryInterface
(
dmt
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IPersistStream failed: %08x
\n
"
,
hr
);
refcount
=
IPersistStream_AddRef
(
ps
);
ok
(
refcount
==
4
,
"refcount == %u, expected 4
\n
"
,
refcount
);
refcount
=
IPersistStream_Release
(
ps
);
hr
=
IDirectMusicTrack_QueryInterface
(
dmt
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
ok
(
refcount
==
5
,
"refcount == %u, expected 5
\n
"
,
refcount
);
refcount
=
IUnknown_Release
(
unk
);
while
(
IDirectMusicTrack_Release
(
dmt
));
}
START_TEST
(
dmscript
)
{
CoInitialize
(
NULL
);
...
...
@@ -143,6 +186,7 @@ START_TEST(dmscript)
return
;
}
test_COM
();
test_COM_scripttrack
();
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