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
4649f2f1
Commit
4649f2f1
authored
Dec 08, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime/tests: Add more GetTrack() tests.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e2f2ad0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
dmime.c
dlls/dmime/tests/dmime.c
+32
-6
No files found.
dlls/dmime/tests/dmime.c
View file @
4649f2f1
...
...
@@ -543,14 +543,17 @@ static void _add_track(IDirectMusicSegment8 *seg, REFCLSID class, const char *na
#define add_track(seg, class, group) _add_track(seg, &CLSID_DirectMusic ## class, #class, group)
static
void
_expect_track
(
IDirectMusicSegment8
*
seg
,
REFCLSID
expect
,
const
char
*
name
,
DWORD
group
,
DWORD
index
)
DWORD
index
,
BOOL
ignore_guid
)
{
IDirectMusicTrack
*
track
;
IPersistStream
*
ps
;
CLSID
class
;
HRESULT
hr
;
hr
=
IDirectMusicSegment8_GetTrack
(
seg
,
&
GUID_NULL
,
group
,
index
,
&
track
);
if
(
ignore_guid
)
hr
=
IDirectMusicSegment8_GetTrack
(
seg
,
&
GUID_NULL
,
group
,
index
,
&
track
);
else
hr
=
IDirectMusicSegment8_GetTrack
(
seg
,
expect
,
group
,
index
,
&
track
);
if
(
!
expect
)
{
ok
(
hr
==
DMUS_E_NOT_FOUND
,
"GetTrack failed: %08x, expected DMUS_E_NOT_FOUND
\n
"
,
hr
);
return
;
...
...
@@ -568,9 +571,12 @@ static void _expect_track(IDirectMusicSegment8 *seg, REFCLSID expect, const char
IDirectMusicTrack_Release
(
track
);
}
#define expect_track(seg, class, group, index) _expect_track(seg, &CLSID_DirectMusic ## class, #class, group, index)
#define expect_track(seg, class, group, index) \
_expect_track(seg, &CLSID_DirectMusic ## class, #class, group, index, TRUE)
#define expect_guid_track(seg, class, group, index) \
_expect_track(seg, &CLSID_DirectMusic ## class, #class, group, index, FALSE)
static
void
test_
track_identify
(
void
)
static
void
test_
gettrack
(
void
)
{
IDirectMusicSegment8
*
seg
;
IDirectMusicTrack
*
track
;
...
...
@@ -586,7 +592,9 @@ static void test_track_identify(void)
add_track
(
seg
,
SegmentTriggerTrack
,
0x2
);
/* idx 1 group 2 */
add_track
(
seg
,
SeqTrack
,
0x1
);
/* idx 2 group 1 */
add_track
(
seg
,
TempoTrack
,
0x7
);
/* idx 3 group 1, idx 2 group 2, idx 0 group 3 */
add_track
(
seg
,
WaveTrack
,
0xffffffff
);
/* idx 4 group 1, idx 3 group 2, idx 1 group 3 */
/* Ignore GUID in GetTrack */
hr
=
IDirectMusicSegment8_GetTrack
(
seg
,
&
GUID_NULL
,
0
,
0
,
&
track
);
ok
(
hr
==
DMUS_E_NOT_FOUND
,
"GetTrack failed: %08x, expected DMUS_E_NOT_FOUND
\n
"
,
hr
);
...
...
@@ -594,12 +602,30 @@ static void test_track_identify(void)
expect_track
(
seg
,
ParamControlTrack
,
0x1
,
1
);
expect_track
(
seg
,
SeqTrack
,
0x1
,
2
);
expect_track
(
seg
,
TempoTrack
,
0x1
,
3
);
_expect_track
(
seg
,
NULL
,
""
,
0x1
,
4
);
expect_track
(
seg
,
WaveTrack
,
0x1
,
4
);
_expect_track
(
seg
,
NULL
,
""
,
0x1
,
5
,
TRUE
);
_expect_track
(
seg
,
NULL
,
""
,
0x1
,
DMUS_SEG_ANYTRACK
,
TRUE
);
expect_track
(
seg
,
ParamControlTrack
,
0x2
,
0
);
expect_track
(
seg
,
WaveTrack
,
0x80000000
,
0
);
expect_track
(
seg
,
SegmentTriggerTrack
,
0x3
,
2
);
/* groups 1+2 combined index */
expect_track
(
seg
,
SeqTrack
,
0x3
,
3
);
/* groups 1+2 combined index */
expect_track
(
seg
,
TempoTrack
,
0x7
,
4
);
/* groups 1+2+3 combined index */
expect_track
(
seg
,
TempoTrack
,
0xffffffff
,
4
);
/* all groups combined index */
_expect_track
(
seg
,
NULL
,
""
,
0xffffffff
,
DMUS_SEG_ANYTRACK
,
TRUE
);
/* Use the GUID in GetTrack */
hr
=
IDirectMusicSegment8_GetTrack
(
seg
,
&
CLSID_DirectMusicLyricsTrack
,
0
,
0
,
&
track
);
ok
(
hr
==
DMUS_E_NOT_FOUND
,
"GetTrack failed: %08x, expected DMUS_E_NOT_FOUND
\n
"
,
hr
);
expect_guid_track
(
seg
,
LyricsTrack
,
0x1
,
0
);
expect_guid_track
(
seg
,
ParamControlTrack
,
0x1
,
0
);
expect_guid_track
(
seg
,
SeqTrack
,
0x1
,
0
);
expect_guid_track
(
seg
,
TempoTrack
,
0x1
,
0
);
expect_guid_track
(
seg
,
ParamControlTrack
,
0x2
,
0
);
expect_guid_track
(
seg
,
SegmentTriggerTrack
,
0x3
,
0
);
expect_guid_track
(
seg
,
SeqTrack
,
0x3
,
0
);
expect_guid_track
(
seg
,
TempoTrack
,
0x7
,
0
);
expect_guid_track
(
seg
,
TempoTrack
,
0xffffffff
,
0
);
IDirectMusicSegment8_Release
(
seg
);
}
...
...
@@ -1090,7 +1116,7 @@ START_TEST(dmime)
test_audiopathconfig
();
test_graph
();
test_segment
();
test_
track_identify
();
test_
gettrack
();
test_track
();
test_parsedescriptor
();
...
...
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