[DSOUND] more test failure fixes
Robert Reif
reif at earthlink.net
Fri Mar 4 18:43:07 CST 2005
Don't consider no sound device a failure.
-------------- next part --------------
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.49
diff -u -p -r1.49 dsound.c
--- dlls/dsound/tests/dsound.c 25 Feb 2005 19:17:11 -0000 1.49
+++ dlls/dsound/tests/dsound.c 5 Mar 2005 00:39:12 -0000
@@ -89,11 +89,14 @@ static void IDirectSound_test(LPDIRECTSO
DXGetErrorString8(rc));
rc=IDirectSound_Initialize(dso,lpGuid);
- ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"IDirectSound_Initialize() failed: %s\n",DXGetErrorString8(rc));
if (rc==DSERR_NODRIVER) {
trace(" No Driver\n");
return;
+ } else if (rc==E_FAIL) {
+ trace(" No Device\n");
+ return;
} else if (rc==DSERR_ALLOCATED) {
trace(" Already Allocated\n");
return;
@@ -210,14 +213,14 @@ static void IDirectSound_tests()
/* try with no device specified */
rc=DirectSoundCreate(NULL,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate(NULL) failed: %s\n",DXGetErrorString8(rc));
if (rc==S_OK && dso)
IDirectSound_test(dso, TRUE, NULL);
/* try with default playback device specified */
rc=DirectSoundCreate(&DSDEVID_DefaultPlayback,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && dso)
@@ -225,7 +228,7 @@ static void IDirectSound_tests()
/* try with default voice playback device specified */
rc=DirectSoundCreate(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n",
DXGetErrorString8(rc));
if (rc==DS_OK && dso)
@@ -250,7 +253,7 @@ static HRESULT test_dsound(LPGUID lpGuid
/* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL);
- ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
if (rc!=DS_OK)
return rc;
More information about the wine-patches
mailing list