[PATCH] dmcompos/tests: Add Chord Map track GetParam/SetParam tests
Michael Stefaniuc
mstefani at winehq.org
Wed Dec 25 14:22:11 CST 2019
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/dmcompos/tests/dmcompos.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/dlls/dmcompos/tests/dmcompos.c b/dlls/dmcompos/tests/dmcompos.c
index e5cb7da8ad..e97f5dc983 100644
--- a/dlls/dmcompos/tests/dmcompos.c
+++ b/dlls/dmcompos/tests/dmcompos.c
@@ -267,8 +267,10 @@ static void test_chordmaptrack(void)
{
IDirectMusicTrack8 *dmt8;
IPersistStream *ps;
+ IDirectMusicChordMap *chordmap;
CLSID class;
ULARGE_INTEGER size;
+ char buf[64] = { 0 };
HRESULT hr;
#define X(guid) &guid, #guid
const struct {
@@ -331,11 +333,31 @@ static void test_chordmaptrack(void)
ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, &GUID_IDirectMusicChordMap);
ok(hr == S_OK, "IsParamSupported(GUID_IDirectMusicChordMap) failed: %08x, expected S_OK\n", hr);
+ hr = IDirectMusicTrack8_GetParam(dmt8, &GUID_IDirectMusicChordMap, 0, NULL, &chordmap);
+ todo_wine ok(hr == DMUS_E_NOT_FOUND,
+ "GetParam(GUID_IDirectMusicChordMap) failed: %08x, expected DMUS_E_NOT_FOUND\n", hr);
+ hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IDirectMusicChordMap, (void **)&chordmap);
+ ok(hr == S_OK, "DirectMusicChordMap create failed: %08x, expected S_OK\n", hr);
+ /* Unsupported but crashes on non interface pointer passed in */
+ hr = IDirectMusicTrack8_SetParam(dmt8, &GUID_IDirectMusicChordMap, 0, chordmap);
+ ok(hr != DMUS_E_SET_UNSUPPORTED,
+ "SetParam(GUID_IDirectMusicChordMap) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n", hr);
+ IDirectMusicChordMap_Release(chordmap);
+
for (i = 0; i < ARRAY_SIZE(unsupported); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt8, unsupported[i].type);
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
unsupported[i].name, hr);
+ hr = IDirectMusicTrack8_GetParam(dmt8, unsupported[i].type, 0, NULL, buf);
+ todo_wine ok(hr == DMUS_E_GET_UNSUPPORTED,
+ "GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
+ unsupported[i].name, hr);
+ hr = IDirectMusicTrack8_SetParam(dmt8, unsupported[i].type, 0, buf);
+ todo_wine ok(hr == DMUS_E_SET_UNSUPPORTED,
+ "SetParam(%s) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n",
+ unsupported[i].name, hr);
}
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
--
2.24.1
More information about the wine-devel
mailing list