dsound tests fix

Robert Reif reif at earthlink.net
Sat Oct 16 20:04:28 CDT 2004


This patch fixes a few more places where no driver present causes problems.
-------------- next part --------------
Index: dlls/dsound/tests/ds3d.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/ds3d.c,v
retrieving revision 1.13
diff -u -r1.13 ds3d.c
--- dlls/dsound/tests/ds3d.c	31 Aug 2004 18:50:59 -0000	1.13
+++ dlls/dsound/tests/ds3d.c	17 Oct 2004 00:59:55 -0000
@@ -636,7 +636,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -877,7 +878,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -959,7 +961,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -1031,7 +1034,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
Index: dlls/dsound/tests/ds3d8.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/ds3d8.c,v
retrieving revision 1.7
diff -u -r1.7 ds3d8.c
--- dlls/dsound/tests/ds3d8.c	8 Sep 2004 19:08:14 -0000	1.7
+++ dlls/dsound/tests/ds3d8.c	17 Oct 2004 00:59:57 -0000
@@ -538,7 +538,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -791,7 +792,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -873,7 +875,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -946,7 +949,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.38
diff -u -r1.38 dsound.c
--- dlls/dsound/tests/dsound.c	25 Aug 2004 02:09:00 -0000	1.38
+++ dlls/dsound/tests/dsound.c	17 Oct 2004 00:59:57 -0000
@@ -94,8 +94,10 @@
            DXGetErrorString8(rc));
 
         rc=IDirectSound_Initialize(dso,lpGuid);
-        ok(rc==DS_OK,"IDirectSound_Initialize() failed: %s\n",
+        ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound_Initialize() failed: %s\n",
            DXGetErrorString8(rc));
+        if (rc==DSERR_NODRIVER)
+            return;
     }
 
     /* DSOUND: Error: Invalid caps buffer */
@@ -245,7 +247,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -344,7 +347,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -485,7 +489,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -621,7 +626,8 @@
 
     /* Create the DirectSound object */
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
Index: dlls/dsound/tests/dsound8.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound8.c,v
retrieving revision 1.7
diff -u -r1.7 dsound8.c
--- dlls/dsound/tests/dsound8.c	8 Sep 2004 19:08:14 -0000	1.7
+++ dlls/dsound/tests/dsound8.c	17 Oct 2004 00:59:58 -0000
@@ -103,8 +103,10 @@
            DXGetErrorString8(rc));
 
         rc=IDirectSound8_Initialize(dso,lpGuid);
-        ok(rc==DS_OK,"IDirectSound8_Initialize() failed: %s\n",
+        ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound8_Initialize() failed: %s\n",
            DXGetErrorString8(rc));
+        if (rc==DSERR_NODRIVER)
+            return;
     }
 
     /* DSOUND: Error: Invalid caps buffer */
@@ -255,7 +257,8 @@
 
     /* Create the DirectSound8 object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -365,7 +368,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -506,7 +510,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
@@ -642,7 +647,8 @@
 
     /* Create the DirectSound object */
     rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         return rc;
 
Index: dlls/dsound/tests/propset.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/propset.c,v
retrieving revision 1.9
diff -u -r1.9 propset.c
--- dlls/dsound/tests/propset.c	8 Sep 2004 19:07:57 -0000	1.9
+++ dlls/dsound/tests/propset.c	17 Oct 2004 00:59:58 -0000
@@ -268,7 +268,8 @@
     trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
 
     rc=DirectSoundCreate(lpGuid,&dso,NULL);
-    ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc));
+    ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
+       DXGetErrorString8(rc));
     if (rc!=DS_OK)
         goto EXIT;
 


More information about the wine-patches mailing list