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
6c22a6ad
Commit
6c22a6ad
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 IDirectMusicComposer.
parent
434842e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
0 deletions
+98
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/dmcompos/tests/Makefile.in
+5
-0
dmcompos.c
dlls/dmcompos/tests/dmcompos.c
+91
-0
No files found.
configure
View file @
6c22a6ad
...
...
@@ -16665,6 +16665,7 @@ wine_fn_config_dll display.drv16 enable_win16
wine_fn_config_dll dmband enable_dmband clean
wine_fn_config_test dlls/dmband/tests dmband_test
wine_fn_config_dll dmcompos enable_dmcompos clean
wine_fn_config_test dlls/dmcompos/tests dmcompos_test
wine_fn_config_dll dmime enable_dmime clean
wine_fn_config_test dlls/dmime/tests dmime_test
wine_fn_config_dll dmloader enable_dmloader clean
...
...
configure.ac
View file @
6c22a6ad
...
...
@@ -2789,6 +2789,7 @@ WINE_CONFIG_DLL(display.drv16,enable_win16)
WINE_CONFIG_DLL(dmband,,[clean])
WINE_CONFIG_TEST(dlls/dmband/tests)
WINE_CONFIG_DLL(dmcompos,,[clean])
WINE_CONFIG_TEST(dlls/dmcompos/tests)
WINE_CONFIG_DLL(dmime,,[clean])
WINE_CONFIG_TEST(dlls/dmime/tests)
WINE_CONFIG_DLL(dmloader,,[clean])
...
...
dlls/dmcompos/tests/Makefile.in
0 → 100644
View file @
6c22a6ad
TESTDLL
=
dmcompos.dll
IMPORTS
=
ole32
C_SRCS
=
\
dmcompos.c
dlls/dmcompos/tests/dmcompos.c
0 → 100644
View file @
6c22a6ad
/*
* Copyright 2014 Michael Stefaniuc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdarg.h>
#include <windef.h>
#include <initguid.h>
#include <wine/test.h>
#include <dmusici.h>
static
BOOL
missing_dmcompos
(
void
)
{
IDirectMusicComposer
*
dmc
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicComposer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicComposer
,
(
void
**
)
&
dmc
);
if
(
hr
==
S_OK
&&
dmc
)
{
IDirectMusicComposer_Release
(
dmc
);
return
FALSE
;
}
return
TRUE
;
}
static
void
test_COM
(
void
)
{
IDirectMusicComposer
*
dmc
=
(
IDirectMusicComposer
*
)
0xdeadbeef
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicComposer
,
(
IUnknown
*
)
&
dmc
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dmc
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicComposer create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dmc
,
"dmc = %p
\n
"
,
dmc
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicComposer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dmc
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicComposer create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicComposer interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicComposer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicComposer
,
(
void
**
)
&
dmc
);
ok
(
hr
==
S_OK
,
"DirectMusicComposer create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicComposer_AddRef
(
dmc
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicComposer_QueryInterface
(
dmc
,
&
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
(
IDirectMusicComposer_Release
(
dmc
));
}
START_TEST
(
dmcompos
)
{
CoInitialize
(
NULL
);
if
(
missing_dmcompos
())
{
skip
(
"dmcompos not available
\n
"
);
CoUninitialize
();
return
;
}
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