user32/tests: When EnumDisplaySettings() fails unexpectedly, trace how many calls were made.
Francois Gouget
fgouget at free.fr
Fri Nov 1 04:19:16 CDT 2013
---
This does not fix the test failures. The goal is mainly to know if
EnumDisplaySettings() fails on the firts pass, which would indicate
something is wrong, or later on which would be more like it returning a
different error code. Though the error code that gets returned
(ERROR_MOD_NOT_FOUND iirc) is quite weird in this context.
dlls/user32/tests/sysparams.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c
index 32432f5..59225fe 100644
--- a/dlls/user32/tests/sysparams.c
+++ b/dlls/user32/tests/sysparams.c
@@ -2865,13 +2865,14 @@ static void test_EnumDisplaySettings(void)
num = 1;
while (1) {
SetLastError (0xdeadbeef);
- if (!EnumDisplaySettingsA(NULL, num++, &devmode)) {
+ if (!EnumDisplaySettingsA(NULL, num, &devmode)) {
DWORD le = GetLastError();
ok(le == ERROR_NO_MORE_FILES ||
le == 0xdeadbeef, /* XP, 2003 */
- "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d\n", le);
+ "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d for %d\n", le, num);
break;
}
+ num++;
}
}
--
1.8.4.rc3
More information about the wine-patches
mailing list