Akihiro Sagawa : winmm/tests: Strictly test returned time format of waveOutGetPostion().

Alexandre Julliard julliard at winehq.org
Thu Jan 21 16:19:16 CST 2021


Module: wine
Branch: master
Commit: 43158a173dddf2485760cfc12060d6f3553a3fdc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=43158a173dddf2485760cfc12060d6f3553a3fdc

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Wed Jan 20 22:23:44 2021 +0900

winmm/tests: Strictly test returned time format of waveOutGetPostion().

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winmm/tests/wave.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index cb18f3e0fa4..786e724c0f0 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -495,9 +495,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
     rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime) + 1);
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
-    if (mmtime.wType != TIME_BYTES && winetest_debug > 1)
-        trace("waveOutGetPosition(%s): TIME_BYTES not supported, returned %s\n",
-              dev_name(device),wave_time_format(mmtime.wType));
+    ok(mmtime.wType == TIME_BYTES, "(waveOutGetPosition(%s): returned %s\n",
+       dev_name(device), wave_time_format(mmtime.wType));
     returned = time_to_bytes(&mmtime, pwfx);
     ok(returned == bytes, "waveOutGetPosition(%s): returned %d bytes, "
        "should be %d\n", dev_name(device), returned, bytes);
@@ -506,9 +505,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
     rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
-    if (mmtime.wType != TIME_SAMPLES && winetest_debug > 1)
-        trace("waveOutGetPosition(%s): TIME_SAMPLES not supported, "
-              "returned %s\n",dev_name(device),wave_time_format(mmtime.wType));
+    ok(mmtime.wType == TIME_SAMPLES, "(waveOutGetPosition(%s): returned %s\n",
+       dev_name(device), wave_time_format(mmtime.wType));
     returned = time_to_bytes(&mmtime, pwfx);
     ok(returned == bytes, "waveOutGetPosition(%s): returned %d samples "
        "(%d bytes), should be %d (%d bytes)\n", dev_name(device),
@@ -529,9 +527,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
     rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
-    if (mmtime.wType != TIME_SMPTE && winetest_debug > 1)
-        trace("waveOutGetPosition(%s): TIME_SMPTE not supported, returned %s\n",
-              dev_name(device),wave_time_format(mmtime.wType));
+    todo_wine ok(mmtime.wType == TIME_BYTES, "(waveOutGetPosition(%s): returned %s\n",
+       dev_name(device), wave_time_format(mmtime.wType));
     returned = time_to_bytes(&mmtime, pwfx);
     ok(returned == bytes, "waveOutGetPosition(%s): SMPTE test failed\n",
        dev_name(device));
@@ -540,9 +537,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
     rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
-    if (mmtime.wType != TIME_MIDI && winetest_debug > 1)
-        trace("waveOutGetPosition(%s): TIME_MIDI not supported, returned %s\n",
-              dev_name(device),wave_time_format(mmtime.wType));
+    ok(mmtime.wType == TIME_BYTES, "(waveOutGetPosition(%s): returned %s\n",
+       dev_name(device), wave_time_format(mmtime.wType));
     returned = time_to_bytes(&mmtime, pwfx);
     ok(returned == bytes, "waveOutGetPosition(%s): MIDI test failed\n",
        dev_name(device));
@@ -551,9 +547,8 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
     rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
     ok(rc==MMSYSERR_NOERROR,
        "waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
-    if (mmtime.wType != TIME_TICKS && winetest_debug > 1)
-        trace("waveOutGetPosition(%s): TIME_TICKS not supported, returned %s\n",
-              dev_name(device),wave_time_format(mmtime.wType));
+    ok(mmtime.wType == TIME_BYTES, "(waveOutGetPosition(%s): returned %s\n",
+       dev_name(device), wave_time_format(mmtime.wType));
     returned = time_to_bytes(&mmtime, pwfx);
     ok(returned == bytes, "waveOutGetPosition(%s): TICKS test failed\n",
        dev_name(device));




More information about the wine-cvs mailing list