mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 11:53:38 +00:00
dmband/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
690e012f01
commit
f586cfa52d
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
TESTDLL = dmband.dll
|
||||
IMPORTS = oleaut32 ole32 uuid
|
||||
|
||||
|
|
|
@ -59,37 +59,37 @@ static void test_COM(void)
|
|||
hr = CoCreateInstance(&CLSID_DirectMusicBand, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void**)&dmb);
|
||||
ok(hr == CLASS_E_NOAGGREGATION,
|
||||
"DirectMusicBand create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
|
||||
"DirectMusicBand create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
|
||||
ok(!dmb, "dmb = %p\n", dmb);
|
||||
|
||||
/* Invalid RIID */
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
|
||||
(void**)&dmb);
|
||||
ok(hr == E_NOINTERFACE, "DirectMusicBand create failed: %08x, expected E_NOINTERFACE\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "DirectMusicBand create failed: %#lx, expected E_NOINTERFACE\n", hr);
|
||||
|
||||
/* Same refcount for all DirectMusicBand interfaces */
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicBand,
|
||||
(void**)&dmb);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %#lx, expected S_OK\n", hr);
|
||||
refcount = IDirectMusicBand_AddRef(dmb);
|
||||
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
|
||||
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
|
||||
|
||||
hr = IDirectMusicBand_QueryInterface(dmb, &IID_IDirectMusicObject, (void**)&dmo);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
|
||||
refcount = IDirectMusicObject_AddRef(dmo);
|
||||
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
|
||||
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
|
||||
refcount = IDirectMusicObject_Release(dmo);
|
||||
|
||||
hr = IDirectMusicBand_QueryInterface(dmb, &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: %#lx\n", hr);
|
||||
refcount = IPersistStream_AddRef(ps);
|
||||
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
|
||||
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
|
||||
refcount = IPersistStream_Release(ps);
|
||||
|
||||
hr = IDirectMusicBand_QueryInterface(dmb, &IID_IUnknown, (void**)&unk);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
|
||||
refcount = IUnknown_AddRef(unk);
|
||||
ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
|
||||
ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
|
||||
refcount = IUnknown_Release(unk);
|
||||
|
||||
while (IDirectMusicBand_Release(dmb));
|
||||
|
@ -108,39 +108,39 @@ static void test_COM_bandtrack(void)
|
|||
hr = CoCreateInstance(&CLSID_DirectMusicBandTrack, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void**)&dmbt);
|
||||
ok(hr == CLASS_E_NOAGGREGATION,
|
||||
"DirectMusicBandTrack create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
|
||||
"DirectMusicBandTrack create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
|
||||
ok(!dmbt, "dmbt = %p\n", dmbt);
|
||||
|
||||
/* Invalid RIID */
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBandTrack, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectMusicObject, (void**)&dmbt);
|
||||
ok(hr == E_NOINTERFACE, "DirectMusicBandTrack create failed: %08x, expected E_NOINTERFACE\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "DirectMusicBandTrack create failed: %#lx, expected E_NOINTERFACE\n", hr);
|
||||
|
||||
/* Same refcount for all DirectMusicBandTrack interfaces */
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBandTrack, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectMusicTrack, (void**)&dmbt);
|
||||
ok(hr == S_OK, "DirectMusicBandTrack create failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "DirectMusicBandTrack create failed: %#lx, expected S_OK\n", hr);
|
||||
refcount = IDirectMusicTrack_AddRef(dmbt);
|
||||
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
|
||||
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
|
||||
|
||||
hr = IDirectMusicTrack_QueryInterface(dmbt, &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: %#lx\n", hr);
|
||||
refcount = IPersistStream_AddRef(ps);
|
||||
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
|
||||
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
|
||||
IPersistStream_Release(ps);
|
||||
|
||||
hr = IDirectMusicTrack_QueryInterface(dmbt, &IID_IUnknown, (void**)&unk);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
|
||||
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
|
||||
refcount = IUnknown_AddRef(unk);
|
||||
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
|
||||
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
|
||||
refcount = IUnknown_Release(unk);
|
||||
|
||||
hr = IDirectMusicTrack_QueryInterface(dmbt, &IID_IDirectMusicBandTrackPrivate,
|
||||
(void**)&private);
|
||||
todo_wine ok(hr == S_OK, "QueryInterface for IID_IDirectMusicBandTrackPrivate failed: %08x\n", hr);
|
||||
todo_wine ok(hr == S_OK, "QueryInterface for IID_IDirectMusicBandTrackPrivate failed: %#lx\n", hr);
|
||||
if (hr == S_OK) {
|
||||
refcount = IUnknown_AddRef(private);
|
||||
ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
|
||||
ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
|
||||
refcount = IUnknown_Release(private);
|
||||
}
|
||||
|
||||
|
@ -157,19 +157,19 @@ static void test_dmband(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectMusicBand, (void**)&dmb);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %#lx, expected S_OK\n", hr);
|
||||
|
||||
/* Unimplemented IPersistStream methods */
|
||||
hr = IDirectMusicBand_QueryInterface(dmb, &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: %#lx\n", hr);
|
||||
hr = IPersistStream_GetClassID(ps, &class);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %#lx\n", hr);
|
||||
hr = IPersistStream_IsDirty(ps);
|
||||
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
|
||||
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
|
||||
hr = IPersistStream_GetSizeMax(ps, &size);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
|
||||
hr = IPersistStream_Save(ps, NULL, TRUE);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
|
||||
|
||||
while (IDirectMusicBand_Release(dmb));
|
||||
}
|
||||
|
@ -223,86 +223,86 @@ static void test_bandtrack(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBandTrack, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectMusicTrack8, (void**)&dmt8);
|
||||
ok(hr == S_OK, "DirectMusicBandTrack create failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "DirectMusicBandTrack create failed: %#lx, expected S_OK\n", hr);
|
||||
|
||||
/* IDirectMusicTrack8 */
|
||||
todo_wine {
|
||||
hr = IDirectMusicTrack8_Init(dmt8, NULL);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
|
||||
}
|
||||
hr = IDirectMusicTrack8_EndPlay(dmt8, NULL);
|
||||
ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr);
|
||||
ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
|
||||
todo_wine
|
||||
ok(hr == DMUS_S_END, "IDirectMusicTrack8_Play failed: %08x\n", hr);
|
||||
ok(hr == DMUS_S_END, "IDirectMusicTrack8_Play failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %#lx\n", hr);
|
||||
|
||||
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %#lx\n", hr);
|
||||
for (i = 0; i < ARRAY_SIZE(param_types); i++) {
|
||||
hr = IDirectMusicTrack8_IsParamSupported(dmt8, param_types[i].type);
|
||||
if (param_types[i].supported) {
|
||||
ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
|
||||
ok(hr == S_OK, "IsParamSupported(%s) failed: %#lx, expected S_OK\n",
|
||||
param_types[i].name, hr);
|
||||
hr = IDirectMusicTrack8_GetParam(dmt8, param_types[i].type, 0, NULL, buf);
|
||||
if (param_types[i].type != &GUID_BandParam)
|
||||
ok(hr == DMUS_E_GET_UNSUPPORTED,
|
||||
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
|
||||
"GetParam(%s) failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n",
|
||||
param_types[i].name, hr);
|
||||
} else {
|
||||
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
|
||||
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
|
||||
"IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
|
||||
param_types[i].name, hr);
|
||||
hr = IDirectMusicTrack8_GetParam(dmt8, param_types[i].type, 0, NULL, buf);
|
||||
ok(hr == DMUS_E_GET_UNSUPPORTED,
|
||||
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
|
||||
"GetParam(%s) failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n",
|
||||
param_types[i].name, hr);
|
||||
hr = IDirectMusicTrack8_SetParam(dmt8, param_types[i].type, 0, buf);
|
||||
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
|
||||
"SetParam(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
|
||||
"SetParam(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
|
||||
param_types[i].name, hr);
|
||||
}
|
||||
}
|
||||
|
||||
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
|
||||
todo_wine {
|
||||
hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
|
||||
ok(hr == DMUS_S_END, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
|
||||
ok(hr == DMUS_S_END, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr);
|
||||
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %#lx\n", hr);
|
||||
}
|
||||
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
|
||||
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
|
||||
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr);
|
||||
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
|
||||
|
||||
/* IPersistStream */
|
||||
hr = IDirectMusicTrack8_QueryInterface(dmt8, &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: %#lx\n", hr);
|
||||
hr = IPersistStream_GetClassID(ps, &class);
|
||||
ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
|
||||
ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
|
||||
ok(IsEqualGUID(&class, &CLSID_DirectMusicBandTrack),
|
||||
"Expected class CLSID_DirectMusicBandTrack got %s\n", wine_dbgstr_guid(&class));
|
||||
|
||||
/* Unimplemented IPersistStream methods */
|
||||
hr = IPersistStream_IsDirty(ps);
|
||||
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
|
||||
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
|
||||
hr = IPersistStream_GetSizeMax(ps, &size);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
|
||||
hr = IPersistStream_Save(ps, NULL, TRUE);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
|
||||
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
|
||||
|
||||
while (IDirectMusicTrack8_Release(dmt8));
|
||||
}
|
||||
|
@ -416,12 +416,12 @@ static void test_parsedescriptor(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectMusicObject, (void **)&dmo);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "DirectMusicBand create failed: %#lx, expected S_OK\n", hr);
|
||||
|
||||
/* Nothing loaded */
|
||||
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
|
||||
ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_OBJECT\n",
|
||||
ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_OBJECT\n",
|
||||
desc.dwValidData);
|
||||
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicBand),
|
||||
"Got class guid %s, expected CLSID_DirectMusicBand\n",
|
||||
|
@ -431,8 +431,8 @@ static void test_parsedescriptor(void)
|
|||
stream = gen_riff_stream(empty);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
|
||||
desc.dwValidData);
|
||||
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicBand),
|
||||
"Got class guid %s, expected CLSID_DirectMusicBand\n",
|
||||
|
@ -442,34 +442,34 @@ static void test_parsedescriptor(void)
|
|||
/* NULL pointers */
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
|
||||
ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
|
||||
ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
|
||||
ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
|
||||
ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
|
||||
|
||||
/* Wrong form */
|
||||
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
|
||||
stream = gen_riff_stream(empty);
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == DMUS_E_INVALID_BAND,
|
||||
"ParseDescriptor failed: %08x, expected DMUS_E_INVALID_BAND\n", hr);
|
||||
"ParseDescriptor failed: %#lx, expected DMUS_E_INVALID_BAND\n", hr);
|
||||
IStream_Release(stream);
|
||||
|
||||
/* A category chunk adds DMUS_OBJ_DATE too */
|
||||
stream = gen_riff_stream(catdate);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
valid = DMUS_OBJ_CLASS | DMUS_OBJ_CATEGORY | DMUS_OBJ_DATE;
|
||||
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
|
||||
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
|
||||
IStream_Release(stream);
|
||||
|
||||
/* All desc chunks, extra DMUS_OBJ_DATE */
|
||||
stream = gen_riff_stream(alldesc);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_CATEGORY|DMUS_OBJ_VERSION|DMUS_OBJ_DATE;
|
||||
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
|
||||
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
|
||||
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicBand),
|
||||
"Got class guid %s, expected CLSID_DirectMusicBand\n",
|
||||
wine_dbgstr_guid(&desc.guidClass));
|
||||
|
@ -478,7 +478,7 @@ static void test_parsedescriptor(void)
|
|||
ok(!lstrcmpW(desc.wszName, L"UNAM"), "Got name '%s', expected 'UNAM'\n",
|
||||
wine_dbgstr_w(desc.wszName));
|
||||
ok(!desc.ftDate.dwHighDateTime && !desc.ftDate.dwLowDateTime,
|
||||
"Got file time %08x %08x, expected 0\n", desc.ftDate.dwHighDateTime,
|
||||
"Got file time %#08lx %#08lx, expected 0\n", desc.ftDate.dwHighDateTime,
|
||||
desc.ftDate.dwLowDateTime);
|
||||
IStream_Release(stream);
|
||||
|
||||
|
@ -487,9 +487,9 @@ static void test_parsedescriptor(void)
|
|||
stream = gen_riff_stream(inam);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME),
|
||||
"Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
|
||||
"Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
|
||||
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
|
||||
wine_dbgstr_w(desc.wszName));
|
||||
IStream_Release(stream);
|
||||
|
@ -499,8 +499,8 @@ static void test_parsedescriptor(void)
|
|||
stream = gen_riff_stream(inam);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
|
||||
desc.dwValidData);
|
||||
IStream_Release(stream);
|
||||
|
||||
|
@ -508,9 +508,9 @@ static void test_parsedescriptor(void)
|
|||
stream = gen_riff_stream(dupes);
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
|
||||
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
|
||||
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_CATEGORY|DMUS_OBJ_VERSION|DMUS_OBJ_DATE;
|
||||
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
|
||||
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
|
||||
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
|
||||
wine_dbgstr_w(desc.wszName));
|
||||
IStream_Release(stream);
|
||||
|
|
Loading…
Reference in a new issue