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
19b9c8fd
Commit
19b9c8fd
authored
Jun 16, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmstyle/tests: Add IPersistStream tests for DM*Track.
parent
36a9f9dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
dmstyle.c
dlls/dmstyle/tests/dmstyle.c
+68
-0
No files found.
dlls/dmstyle/tests/dmstyle.c
View file @
19b9c8fd
...
...
@@ -239,6 +239,73 @@ static void test_dmstyle(void)
while
(
IDirectMusicStyle_Release
(
dms
));
}
static
void
test_track
(
void
)
{
IDirectMusicTrack8
*
dmt8
;
IPersistStream
*
ps
;
CLSID
classid
;
ULARGE_INTEGER
size
;
HRESULT
hr
;
#define X(class) &CLSID_ ## class, #class
const
struct
{
REFCLSID
clsid
;
const
char
*
name
;
BOOL
has_save
;
BOOL
todo
;
}
class
[]
=
{
{
X
(
DirectMusicAuditionTrack
),
TRUE
,
TRUE
},
{
X
(
DirectMusicChordTrack
),
TRUE
,
FALSE
},
{
X
(
DirectMusicCommandTrack
),
TRUE
,
TRUE
},
{
X
(
DirectMusicMotifTrack
),
FALSE
,
TRUE
},
{
X
(
DirectMusicMuteTrack
),
TRUE
,
TRUE
},
{
X
(
DirectMusicStyleTrack
),
FALSE
,
FALSE
},
};
#undef X
unsigned
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
class
);
i
++
)
{
trace
(
"Testing %s
\n
"
,
class
[
i
].
name
);
hr
=
CoCreateInstance
(
class
[
i
].
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicTrack8
,
(
void
**
)
&
dmt8
);
if
(
hr
==
E_NOINTERFACE
&&
!
dmt8
)
{
skip
(
"%s not created with CoCreateInstance()
\n
"
,
class
[
i
].
name
);
continue
;
}
ok
(
hr
==
S_OK
,
"%s create failed: %08x, expected S_OK
\n
"
,
class
[
i
].
name
,
hr
);
/* IPersistStream */
hr
=
IDirectMusicTrack8_QueryInterface
(
dmt8
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IPersistStream failed: %08x
\n
"
,
hr
);
hr
=
IPersistStream_GetClassID
(
ps
,
&
classid
);
if
(
class
[
i
].
todo
)
{
todo_wine
{
ok
(
hr
==
S_OK
,
"IPersistStream_GetClassID failed: %08x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
classid
,
class
[
i
].
clsid
),
"Expected class %s got %s
\n
"
,
class
[
i
].
name
,
wine_dbgstr_guid
(
&
classid
));
hr
=
IPersistStream_IsDirty
(
ps
);
ok
(
hr
==
S_FALSE
,
"IPersistStream_IsDirty failed: %08x
\n
"
,
hr
);
}
}
else
{
ok
(
hr
==
S_OK
,
"IPersistStream_GetClassID failed: %08x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
classid
,
class
[
i
].
clsid
),
"Expected class %s got %s
\n
"
,
class
[
i
].
name
,
wine_dbgstr_guid
(
&
classid
));
hr
=
IPersistStream_IsDirty
(
ps
);
ok
(
hr
==
S_FALSE
,
"IPersistStream_IsDirty failed: %08x
\n
"
,
hr
);
}
hr
=
IPersistStream_GetSizeMax
(
ps
,
&
size
);
ok
(
hr
==
E_NOTIMPL
,
"IPersistStream_GetSizeMax failed: %08x
\n
"
,
hr
);
hr
=
IPersistStream_Save
(
ps
,
NULL
,
TRUE
);
if
(
class
[
i
].
has_save
)
todo_wine
ok
(
hr
==
E_POINTER
,
"IPersistStream_Save failed: %08x
\n
"
,
hr
);
else
ok
(
hr
==
E_NOTIMPL
,
"IPersistStream_Save failed: %08x
\n
"
,
hr
);
while
(
IDirectMusicTrack8_Release
(
dmt8
));
}
}
START_TEST
(
dmstyle
)
{
CoInitialize
(
NULL
);
...
...
@@ -253,6 +320,7 @@ START_TEST(dmstyle)
test_COM_section
();
test_COM_track
();
test_dmstyle
();
test_track
();
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