Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
e5b4b693
Commit
e5b4b693
authored
11 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
dmstyle/tests: Add COM tests for IDirectMusicStyle8.
parent
65942c17
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+1
-0
1 addition, 0 deletions
configure
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
dlls/dmstyle/tests/Makefile.in
+5
-0
5 additions, 0 deletions
dlls/dmstyle/tests/Makefile.in
dlls/dmstyle/tests/dmstyle.c
+104
-0
104 additions, 0 deletions
dlls/dmstyle/tests/dmstyle.c
with
111 additions
and
0 deletions
configure
+
1
−
0
View file @
e5b4b693
...
...
@@ -16672,6 +16672,7 @@ wine_fn_config_test dlls/dmloader/tests dmloader_test
wine_fn_config_dll dmscript enable_dmscript clean
wine_fn_config_test dlls/dmscript/tests dmscript_test
wine_fn_config_dll dmstyle enable_dmstyle clean
wine_fn_config_test dlls/dmstyle/tests dmstyle_test
wine_fn_config_dll dmsynth enable_dmsynth clean
wine_fn_config_test dlls/dmsynth/tests dmsynth_test
wine_fn_config_dll dmusic enable_dmusic clean
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
0
View file @
e5b4b693
...
...
@@ -2796,6 +2796,7 @@ WINE_CONFIG_TEST(dlls/dmloader/tests)
WINE_CONFIG_DLL(dmscript,,[clean])
WINE_CONFIG_TEST(dlls/dmscript/tests)
WINE_CONFIG_DLL(dmstyle,,[clean])
WINE_CONFIG_TEST(dlls/dmstyle/tests)
WINE_CONFIG_DLL(dmsynth,,[clean])
WINE_CONFIG_TEST(dlls/dmsynth/tests)
WINE_CONFIG_DLL(dmusic,,[clean])
...
...
This diff is collapsed.
Click to expand it.
dlls/dmstyle/tests/Makefile.in
0 → 100644
+
5
−
0
View file @
e5b4b693
TESTDLL
=
dmstyle.dll
IMPORTS
=
ole32
C_SRCS
=
\
dmstyle.c
This diff is collapsed.
Click to expand it.
dlls/dmstyle/tests/dmstyle.c
0 → 100644
+
104
−
0
View file @
e5b4b693
/*
* 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_dmstyle
(
void
)
{
IDirectMusicStyle
*
dms
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicStyle
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicStyle
,
(
void
**
)
&
dms
);
if
(
hr
==
S_OK
&&
dms
)
{
IDirectMusicStyle_Release
(
dms
);
return
FALSE
;
}
return
TRUE
;
}
static
void
test_COM
(
void
)
{
IDirectMusicStyle8
*
dms8
=
(
IDirectMusicStyle8
*
)
0xdeadbeef
;
IDirectMusicObject
*
dmo
;
IPersistStream
*
ps
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
/* COM aggregation */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicStyle
,
(
IUnknown
*
)
&
dms8
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
dms8
);
ok
(
hr
==
CLASS_E_NOAGGREGATION
,
"DirectMusicStyle8 create failed: %08x, expected CLASS_E_NOAGGREGATION
\n
"
,
hr
);
ok
(
!
dms8
,
"dms8 = %p
\n
"
,
dms8
);
/* Invalid RIID */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicStyle
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IClassFactory
,
(
void
**
)
&
dms8
);
ok
(
hr
==
E_NOINTERFACE
,
"DirectMusicStyle8 create failed: %08x, expected E_NOINTERFACE
\n
"
,
hr
);
/* Same refcount for all DirectMusicStyle8 interfaces */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicStyle
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicStyle8
,
(
void
**
)
&
dms8
);
ok
(
hr
==
S_OK
,
"DirectMusicStyle8 create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectMusicStyle8_AddRef
(
dms8
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectMusicStyle8_QueryInterface
(
dms8
,
&
IID_IDirectMusicObject
,
(
void
**
)
&
dmo
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectMusicObject failed: %08x
\n
"
,
hr
);
refcount
=
IDirectMusicObject_AddRef
(
dmo
);
ok
(
refcount
==
4
,
"refcount == %u, expected 4
\n
"
,
refcount
);
refcount
=
IDirectMusicObject_Release
(
dmo
);
hr
=
IDirectMusicStyle8_QueryInterface
(
dms8
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IPersistStream failed: %08x
\n
"
,
hr
);
refcount
=
IPersistStream_AddRef
(
ps
);
ok
(
refcount
==
5
,
"refcount == %u, expected 5
\n
"
,
refcount
);
refcount
=
IPersistStream_Release
(
ps
);
hr
=
IDirectMusicStyle8_QueryInterface
(
dms8
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
ok
(
refcount
==
6
,
"refcount == %u, expected 6
\n
"
,
refcount
);
refcount
=
IUnknown_Release
(
unk
);
while
(
IDirectMusicStyle8_Release
(
dms8
));
}
START_TEST
(
dmstyle
)
{
CoInitialize
(
NULL
);
if
(
missing_dmstyle
())
{
skip
(
"dmstyle not available
\n
"
);
CoUninitialize
();
return
;
}
test_COM
();
CoUninitialize
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment