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
1f5e2b78
Commit
1f5e2b78
authored
Nov 18, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime/tests: Check all IDirectMusicTrack_IsParamSupported() types.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d65f1e55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
20 deletions
+62
-20
dmime.c
dlls/dmime/tests/dmime.c
+62
-20
No files found.
dlls/dmime/tests/dmime.c
View file @
1f5e2b78
...
...
@@ -532,24 +532,62 @@ static void test_track(void)
CLSID
classid
;
ULARGE_INTEGER
size
;
HRESULT
hr
;
#define X(guid) &guid, #guid
const
struct
{
REFGUID
type
;
const
char
*
name
;
}
param_types
[]
=
{
{
X
(
GUID_BandParam
)
},
{
X
(
GUID_ChordParam
)
},
{
X
(
GUID_Clear_All_Bands
)
},
{
X
(
GUID_CommandParam
)
},
{
X
(
GUID_CommandParam2
)
},
{
X
(
GUID_CommandParamNext
)
},
{
X
(
GUID_ConnectToDLSCollection
)
},
{
X
(
GUID_Disable_Auto_Download
)
},
{
X
(
GUID_DisableTempo
)
},
{
X
(
GUID_DisableTimeSig
)
},
{
X
(
GUID_Download
)
},
{
X
(
GUID_DownloadToAudioPath
)
},
{
X
(
GUID_Enable_Auto_Download
)
},
{
X
(
GUID_EnableTempo
)
},
{
X
(
GUID_EnableTimeSig
)
},
{
X
(
GUID_IDirectMusicBand
)
},
{
X
(
GUID_IDirectMusicChordMap
)
},
{
X
(
GUID_IDirectMusicStyle
)
},
{
X
(
GUID_MuteParam
)
},
{
X
(
GUID_Play_Marker
)
},
{
X
(
GUID_RhythmParam
)
},
{
X
(
GUID_SeedVariations
)
},
{
X
(
GUID_StandardMIDIFile
)
},
{
X
(
GUID_TempoParam
)
},
{
X
(
GUID_TimeSignature
)
},
{
X
(
GUID_Unload
)
},
{
X
(
GUID_UnloadFromAudioPath
)
},
{
X
(
GUID_Valid_Start_Time
)
},
{
X
(
GUID_Variations
)
},
{
X
(
GUID_NULL
)
}
};
#undef X
#define X(class) &CLSID_ ## class, #class
const
struct
{
REFCLSID
clsid
;
const
char
*
name
;
BOOL
has_param
;
/* bitfield with supported param types */
unsigned
int
has_params
;
}
class
[]
=
{
{
X
(
DirectMusicLyricsTrack
),
TRUE
},
{
X
(
DirectMusicMarkerTrack
),
TRUE
},
{
X
(
DirectMusicParamControlTrack
),
TRUE
},
{
X
(
DirectMusicSegmentTriggerTrack
),
TRUE
},
{
X
(
DirectMusicSeqTrack
),
FALSE
},
{
X
(
DirectMusicSysExTrack
),
FALSE
},
{
X
(
DirectMusicTempoTrack
),
TRUE
},
{
X
(
DirectMusicTimeSigTrack
),
TRUE
},
{
X
(
DirectMusicWaveTrack
),
TRUE
}
{
X
(
DirectMusicLyricsTrack
),
0
},
{
X
(
DirectMusicMarkerTrack
),
0x8080000
},
{
X
(
DirectMusicParamControlTrack
),
0
},
{
X
(
DirectMusicSegmentTriggerTrack
),
0x3fffffff
},
{
X
(
DirectMusicSeqTrack
),
~
0
},
/* param methods not implemented */
{
X
(
DirectMusicSysExTrack
),
~
0
},
/* param methods not implemented */
{
X
(
DirectMusicTempoTrack
),
0x802100
},
{
X
(
DirectMusicTimeSigTrack
),
0x1004200
},
{
X
(
DirectMusicWaveTrack
),
0x6001c80
}
};
#undef X
unsigned
int
i
;
unsigned
int
i
,
j
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
class
);
i
++
)
{
trace
(
"Testing %s
\n
"
,
class
[
i
].
name
);
...
...
@@ -558,7 +596,18 @@ static void test_track(void)
ok
(
hr
==
S_OK
,
"%s create failed: %08x, expected S_OK
\n
"
,
class
[
i
].
name
,
hr
);
/* IDirectMusicTrack */
if
(
!
class
[
i
].
has_param
)
{
if
(
class
[
i
].
has_params
!=
~
0
)
{
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
param_types
);
j
++
)
{
hr
=
IDirectMusicTrack8_IsParamSupported
(
dmt
,
param_types
[
j
].
type
);
if
(
class
[
i
].
has_params
&
(
1
<<
j
))
ok
(
hr
==
S_OK
,
"IsParamSupported(%s) failed: %08x, expected S_OK
\n
"
,
param_types
[
j
].
name
,
hr
);
else
ok
(
hr
==
DMUS_E_TYPE_UNSUPPORTED
,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED
\n
"
,
param_types
[
j
].
name
,
hr
);
}
}
else
{
hr
=
IDirectMusicTrack_GetParam
(
dmt
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_NOTIMPL
,
"IDirectMusicTrack_GetParam failed: %08x
\n
"
,
hr
);
hr
=
IDirectMusicTrack_SetParam
(
dmt
,
NULL
,
0
,
NULL
);
...
...
@@ -569,13 +618,6 @@ static void test_track(void)
hr
=
IDirectMusicTrack_IsParamSupported
(
dmt
,
&
GUID_IDirectMusicStyle
);
ok
(
hr
==
E_NOTIMPL
,
"got: %08x
\n
"
,
hr
);
}
else
{
hr
=
IDirectMusicTrack_IsParamSupported
(
dmt
,
&
GUID_IDirectMusicStyle
);
if
(
class
[
i
].
clsid
==
&
CLSID_DirectMusicSegmentTriggerTrack
)
ok
(
hr
==
S_OK
,
"got: %08x
\n
"
,
hr
);
else
ok
(
hr
==
DMUS_E_TYPE_UNSUPPORTED
,
"got: %08x
\n
"
,
hr
);
}
if
(
class
[
i
].
clsid
!=
&
CLSID_DirectMusicMarkerTrack
&&
class
[
i
].
clsid
!=
&
CLSID_DirectMusicTimeSigTrack
)
{
hr
=
IDirectMusicTrack_AddNotificationType
(
dmt
,
NULL
);
...
...
@@ -591,7 +633,7 @@ static void test_track(void)
if
(
hr
==
S_OK
)
{
hr
=
IDirectMusicTrack8_PlayEx
(
dmt8
,
NULL
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
hr
==
E_POINTER
,
"IDirectMusicTrack8_PlayEx failed: %08x
\n
"
,
hr
);
if
(
!
class
[
i
].
has_param
)
{
if
(
class
[
i
].
has_params
==
~
0
)
{
hr
=
IDirectMusicTrack8_GetParamEx
(
dmt8
,
NULL
,
0
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
hr
==
E_NOTIMPL
,
"IDirectMusicTrack8_GetParamEx failed: %08x
\n
"
,
hr
);
hr
=
IDirectMusicTrack8_SetParamEx
(
dmt8
,
NULL
,
0
,
NULL
,
NULL
,
0
);
...
...
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