dmime/tests: Add some basic IDirectMusicTrack8 tests.
This commit is contained in:
parent
8e959e1203
commit
3de79096aa
|
@ -484,6 +484,7 @@ static void test_segment(void)
|
||||||
static void test_track(void)
|
static void test_track(void)
|
||||||
{
|
{
|
||||||
IDirectMusicTrack *dmt;
|
IDirectMusicTrack *dmt;
|
||||||
|
IDirectMusicTrack8 *dmt8;
|
||||||
IPersistStream *ps;
|
IPersistStream *ps;
|
||||||
CLSID classid;
|
CLSID classid;
|
||||||
ULARGE_INTEGER size;
|
ULARGE_INTEGER size;
|
||||||
|
@ -492,16 +493,17 @@ static void test_track(void)
|
||||||
const struct {
|
const struct {
|
||||||
REFCLSID clsid;
|
REFCLSID clsid;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
BOOL has_param;
|
||||||
} class[] = {
|
} class[] = {
|
||||||
{ X(DirectMusicLyricsTrack) },
|
{ X(DirectMusicLyricsTrack), TRUE },
|
||||||
{ X(DirectMusicMarkerTrack) },
|
{ X(DirectMusicMarkerTrack), TRUE },
|
||||||
{ X(DirectMusicParamControlTrack) },
|
{ X(DirectMusicParamControlTrack), TRUE },
|
||||||
{ X(DirectMusicSegmentTriggerTrack) },
|
{ X(DirectMusicSegmentTriggerTrack), TRUE },
|
||||||
{ X(DirectMusicSeqTrack) },
|
{ X(DirectMusicSeqTrack), FALSE },
|
||||||
{ X(DirectMusicSysExTrack) },
|
{ X(DirectMusicSysExTrack), FALSE },
|
||||||
{ X(DirectMusicTempoTrack) },
|
{ X(DirectMusicTempoTrack), TRUE },
|
||||||
{ X(DirectMusicTimeSigTrack) },
|
{ X(DirectMusicTimeSigTrack), TRUE },
|
||||||
{ X(DirectMusicWaveTrack) }
|
{ X(DirectMusicWaveTrack), TRUE }
|
||||||
};
|
};
|
||||||
#undef X
|
#undef X
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -512,6 +514,46 @@ static void test_track(void)
|
||||||
(void**)&dmt);
|
(void**)&dmt);
|
||||||
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
|
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
|
||||||
|
|
||||||
|
/* IDirectMusicTrack */
|
||||||
|
if (!class[i].has_param) {
|
||||||
|
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);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack_SetParam failed: %08x\n", hr);
|
||||||
|
hr = IDirectMusicTrack_IsParamSupported(dmt, NULL);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack_IsParamSupported failed: %08x\n", hr);
|
||||||
|
}
|
||||||
|
if (class[i].clsid != &CLSID_DirectMusicMarkerTrack &&
|
||||||
|
class[i].clsid != &CLSID_DirectMusicTimeSigTrack) {
|
||||||
|
hr = IDirectMusicTrack_AddNotificationType(dmt, NULL);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack_AddNotificationType failed: %08x\n", hr);
|
||||||
|
hr = IDirectMusicTrack_RemoveNotificationType(dmt, NULL);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack_RemoveNotificationType failed: %08x\n", hr);
|
||||||
|
}
|
||||||
|
hr = IDirectMusicTrack_Clone(dmt, 0, 0, NULL);
|
||||||
|
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack_Clone failed: %08x\n", hr);
|
||||||
|
|
||||||
|
/* IDirectMusicTrack8 */
|
||||||
|
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IDirectMusicTrack8, (void**)&dmt8);
|
||||||
|
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) {
|
||||||
|
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);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr);
|
||||||
|
}
|
||||||
|
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
|
||||||
|
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
|
||||||
|
if (class[i].clsid == &CLSID_DirectMusicTempoTrack)
|
||||||
|
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr);
|
||||||
|
else
|
||||||
|
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
|
||||||
|
IDirectMusicTrack8_Release(dmt8);
|
||||||
|
}
|
||||||
|
|
||||||
/* IPersistStream */
|
/* IPersistStream */
|
||||||
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
|
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
|
||||||
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
|
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
|
||||||
|
|
Loading…
Reference in New Issue