winmm test patch

Robert Reif reif at earthlink.net
Tue Apr 27 19:41:54 CDT 2004


Another error return value check added after looking at
the windows tests results.
Replaced -1 with WAVE_MAPPER.
-------------- next part --------------
Index: dlls/winmm/tests/wave.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/tests/wave.c,v
retrieving revision 1.18
diff -u -r1.18 wave.c
--- dlls/winmm/tests/wave.c	27 Apr 2004 23:28:47 -0000	1.18
+++ dlls/winmm/tests/wave.c	28 Apr 2004 00:25:05 -0000
@@ -268,7 +268,7 @@
     ok(rc==MMSYSERR_BADDEVICEID,
        "waveOutGetDevCapsA: MMSYSERR_BADDEVICEID expected, got %d\n",rc);
 
-    rc=waveOutGetDevCapsA(-1,&caps,sizeof(caps));
+    rc=waveOutGetDevCapsA(WAVE_MAPPER,&caps,sizeof(caps));
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetDevCapsA: MMSYSERR_NOERROR expected, got %d\n",rc);
 
@@ -335,7 +335,7 @@
         format.cbSize=0;
         oformat=format;
         rc=waveOutOpen(&wout,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT);
-        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG,
+        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM,
            "waveOutOpen: opening the device in 11 bits mode should fail %d: rc=%d\n",d,rc);
         if (rc==MMSYSERR_NOERROR) {
             trace("     got %ldx%2dx%d for %ldx%2dx%d\n",
@@ -356,7 +356,7 @@
         format.cbSize=0;
         oformat=format;
         rc=waveOutOpen(&wout,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT);
-        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG,
+        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM,
            "waveOutOpen: opening the device at 2 MHz sample rate should fail %d: rc=%d\n",d,rc);
         if (rc==MMSYSERR_NOERROR) {
             trace("     got %ldx%2dx%d for %ldx%2dx%d\n",
@@ -490,7 +490,7 @@
     ok(rc==MMSYSERR_BADDEVICEID,
        "waveInGetDevCapsA: MMSYSERR_BADDEVICEID expected, got %d(%s)\n",rc,wave_in_error(rc));
 
-    rc=waveInGetDevCapsA(-1,&caps,sizeof(caps));
+    rc=waveInGetDevCapsA(WAVE_MAPPER,&caps,sizeof(caps));
     ok(rc==MMSYSERR_NOERROR,
        "waveInGetDevCapsA: MMSYSERR_NOERROR expected, got %d\n",rc);
 
@@ -557,7 +557,7 @@
         format.cbSize=0;
         oformat=format;
         rc=waveInOpen(&win,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT);
-        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG,
+        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM,
            "waveInOpen: opening the device in 11 bit mode should fail %d: rc=%d\n",d,rc);
         if (rc==MMSYSERR_NOERROR) {
             trace("     got %ldx%2dx%d for %ldx%2dx%d\n",
@@ -578,7 +578,7 @@
         format.cbSize=0;
         oformat=format;
         rc=waveInOpen(&win,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT);
-        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG,
+        ok(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM,
            "waveInOpen: opening the device with 2 MHz sample rate should fail %d: rc=%d\n",d,rc);
         if (rc==MMSYSERR_NOERROR) {
             trace("     got %ldx%2dx%d for %ldx%2dx%d\n",


More information about the wine-patches mailing list