Commit 9299c498 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/tests: Replace some '#if 0's with 'if (0)'s.

Fix the code so it compiles without warnings.
parent 7a76ae1a
...@@ -532,9 +532,8 @@ static void testCtrlHandler(void) ...@@ -532,9 +532,8 @@ static void testCtrlHandler(void)
mch_event = CreateEventA(NULL, TRUE, FALSE, NULL); mch_event = CreateEventA(NULL, TRUE, FALSE, NULL);
mch_count = 0; mch_count = 0;
ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n"); ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n");
#if 0 /* FIXME: it isn't synchronous on wine but it can still happen before we test */ /* FIXME: it isn't synchronous on wine but it can still happen before we test */
todo_wine ok(mch_count == 1, "Event isn't synchronous\n"); if (0) ok(mch_count == 1, "Event isn't synchronous\n");
#endif
ok(WaitForSingleObject(mch_event, 3000) == WAIT_OBJECT_0, "event sending didn't work\n"); ok(WaitForSingleObject(mch_event, 3000) == WAIT_OBJECT_0, "event sending didn't work\n");
CloseHandle(mch_event); CloseHandle(mch_event);
......
...@@ -693,12 +693,14 @@ static void test_CreateFileW(void) ...@@ -693,12 +693,14 @@ static void test_CreateFileW(void)
ret = DeleteFileW(filename); ret = DeleteFileW(filename);
ok(ret, "DeleteFileW: error %d\n", GetLastError()); ok(ret, "DeleteFileW: error %d\n", GetLastError());
#if 0 /* this test crashes on NT4.0 */ if (0)
hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL, {
CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); /* this crashes on NT4.0 */
ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL,
"CreateFileW(NULL) returned ret=%p error=%ld\n",hFile,GetLastError()); CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0);
#endif ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND,
"CreateFileW(NULL) returned ret=%p error=%u\n",hFile,GetLastError());
}
hFile = CreateFileW(emptyW, GENERIC_READ, 0, NULL, hFile = CreateFileW(emptyW, GENERIC_READ, 0, NULL,
CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0);
......
...@@ -964,10 +964,9 @@ static void test_GetSystemDirectory(void) ...@@ -964,10 +964,9 @@ static void test_GetSystemDirectory(void)
ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError());
total = res; total = res;
#if 0
/* this test crash on XP */ /* this crashes on XP */
res = GetSystemDirectory(NULL, total); if (0) res = GetSystemDirectory(NULL, total);
#endif
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
res = GetSystemDirectory(NULL, total-1); res = GetSystemDirectory(NULL, total-1);
...@@ -1024,10 +1023,8 @@ static void test_GetWindowsDirectory(void) ...@@ -1024,10 +1023,8 @@ static void test_GetWindowsDirectory(void)
ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError());
total = res; total = res;
#if 0 /* this crashes on XP */
/* this test crash on XP */ if (0) res = GetWindowsDirectory(NULL, total);
res = GetWindowsDirectory(NULL, total);
#endif
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
res = GetWindowsDirectory(NULL, total-1); res = GetWindowsDirectory(NULL, total-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment