[WINMM] fix timer tests
Robert Reif
reif at earthlink.net
Thu Feb 17 17:49:49 CST 2005
Fix timer tests to pass on windows 98.
-------------- next part --------------
Index: dlls/winmm/tests/timer.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/tests/timer.c,v
retrieving revision 1.2
diff -u -p -r1.2 timer.c
--- dlls/winmm/tests/timer.c 14 Feb 2005 20:54:12 -0000 1.2
+++ dlls/winmm/tests/timer.c 17 Feb 2005 23:47:27 -0000
@@ -33,23 +33,26 @@
#include "winmm_test.h"
-TIMECAPS tc;
+static TIMECAPS tc;
-void test_timeGetDevCaps()
+static void test_timeGetDevCaps()
{
MMRESULT rc;
rc = timeGetDevCaps(&tc, 0);
- ok(rc == TIMERR_NOCANDO, "timeGetDevCaps() returned %s, "
- "should have returned TIMERR_NOCANDO\n", mmsys_error(rc));
+ ok(rc == TIMERR_NOCANDO || rc == MMSYSERR_INVALPARAM,
+ "timeGetDevCaps() returned %s, should have returned TIMERR_NOCANDO "
+ "or MMSYSERR_INVALPARAM\n", mmsys_error(rc));
rc = timeGetDevCaps(0, sizeof(tc));
- ok(rc == TIMERR_NOCANDO, "timeGetDevCaps() returned %s, "
- "should have returned TIMERR_NOCANDO\n", mmsys_error(rc));
+ ok(rc == TIMERR_NOCANDO || rc == TIMERR_STRUCT,
+ "timeGetDevCaps() returned %s, should have returned TIMERR_NOCANDO "
+ "or TIMERR_STRUCT\n", mmsys_error(rc));
rc = timeGetDevCaps(0, 0);
- ok(rc == TIMERR_NOCANDO, "timeGetDevCaps() returned %s, "
- "should have returned TIMERR_NOCANDO\n", mmsys_error(rc));
+ ok(rc == TIMERR_NOCANDO || rc == MMSYSERR_INVALPARAM,
+ "timeGetDevCaps() returned %s, should have returned TIMERR_NOCANDO "
+ "or MMSYSERR_INVALPARAM\n", mmsys_error(rc));
rc = timeGetDevCaps(&tc, sizeof(tc));
ok(rc == TIMERR_NOERROR, "timeGetDevCaps() returned %s, "
@@ -65,13 +68,13 @@ void test_timeGetDevCaps()
static DWORD count = 0;
static DWORD times[NUM_SAMPLES];
-void CALLBACK testTimeProc(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
+static void CALLBACK testTimeProc(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
if (count < NUM_SAMPLES)
times[count++] = timeGetTime();
}
-void test_timer(UINT period, UINT resolution)
+static void test_timer(UINT period, UINT resolution)
{
MMRESULT rc;
UINT i, id, delta;
More information about the wine-patches
mailing list