dsound tests no driver fix

Robert Reif reif at earthlink.net
Tue Oct 19 06:21:24 CDT 2004


Don't consider failure with DSERR_NODRIVER a test failure.
-------------- next part --------------
diff -u wine.cvs/dlls/dsound/tests/dsound8.c wine/dlls/dsound/tests/dsound8.c
--- wine.cvs/dlls/dsound/tests/dsound8.c	2004-10-19 07:14:06.000000000 -0400
+++ wine/dlls/dsound/tests/dsound8.c	2004-10-19 07:09:45.000000000 -0400
@@ -222,20 +222,23 @@
 
     /* try with no device specified */
     rc=pDirectSoundCreate8(NULL,&dso,NULL);
-    ok(rc==S_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
-    if (dso)
+    ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
+    if (rc==DS_OK && dso)
         IDirectSound8_test(dso, TRUE, NULL);
 
     /* try with default playback device specified */
     rc=pDirectSoundCreate8(&DSDEVID_DefaultPlayback,&dso,NULL);
-    ok(rc==S_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
-    if (dso)
+    ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
+    if (rc==DS_OK && dso)
         IDirectSound8_test(dso, TRUE, NULL);
 
     /* try with default voice playback device specified */
     rc=pDirectSoundCreate8(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
-    ok(rc==S_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
-    if (dso)
+    ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
+    if (rc==DS_OK && dso)
         IDirectSound8_test(dso, TRUE, NULL);
 
     /* try with a bad device specified */
diff -u wine.cvs/dlls/dsound/tests/dsound.c wine/dlls/dsound/tests/dsound.c
--- wine.cvs/dlls/dsound/tests/dsound.c	2004-10-19 07:14:06.000000000 -0400
+++ wine/dlls/dsound/tests/dsound.c	2004-10-19 07:08:49.000000000 -0400
@@ -210,22 +210,24 @@
 
     /* try with no device specified */
     rc=DirectSoundCreate(NULL,&dso,NULL);
-    ok(rc==S_OK,"DirectSoundCreate(NULL) failed: %s\n",DXGetErrorString8(rc));
-    if (dso)
+    ok(rc==S_OK||rc==DSERR_NODRIVER,"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,"DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s\n",
-       DXGetErrorString8(rc));
-    if (dso)
+    ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate(DSDEVID_DefaultPlayback)"
+       " failed: %s\n", DXGetErrorString8(rc));
+    if (rc==DS_OK && dso)
         IDirectSound_test(dso, TRUE, NULL);
 
     /* try with default voice playback device specified */
     rc=DirectSoundCreate(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
-    ok(rc==S_OK,"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n",
+    ok(rc==S_OK||rc==DSERR_NODRIVER,
+       "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n",
        DXGetErrorString8(rc));
-    if (dso)
+    if (rc==DS_OK && dso)
         IDirectSound_test(dso, TRUE, NULL);
 
     /* try with a bad device specified */


More information about the wine-patches mailing list