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

Fix the code so it compiles without warnings.
This commit is contained in:
Francois Gouget 2007-01-06 19:32:56 +01:00 committed by Alexandre Julliard
parent 7a76ae1a65
commit 9299c4985e
3 changed files with 15 additions and 17 deletions

View File

@ -532,9 +532,8 @@ static void testCtrlHandler(void)
mch_event = CreateEventA(NULL, TRUE, FALSE, NULL);
mch_count = 0;
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 */
todo_wine ok(mch_count == 1, "Event isn't synchronous\n");
#endif
/* FIXME: it isn't synchronous on wine but it can still happen before we test */
if (0) ok(mch_count == 1, "Event isn't synchronous\n");
ok(WaitForSingleObject(mch_event, 3000) == WAIT_OBJECT_0, "event sending didn't work\n");
CloseHandle(mch_event);

View File

@ -693,12 +693,14 @@ static void test_CreateFileW(void)
ret = DeleteFileW(filename);
ok(ret, "DeleteFileW: error %d\n", GetLastError());
#if 0 /* this test crashes on NT4.0 */
hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL,
CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0);
ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND,
"CreateFileW(NULL) returned ret=%p error=%ld\n",hFile,GetLastError());
#endif
if (0)
{
/* this crashes on NT4.0 */
hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL,
CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0);
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,
CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0);

View File

@ -964,10 +964,9 @@ static void test_GetSystemDirectory(void)
ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError());
total = res;
#if 0
/* this test crash on XP */
res = GetSystemDirectory(NULL, total);
#endif
/* this crashes on XP */
if (0) res = GetSystemDirectory(NULL, total);
SetLastError(0xdeadbeef);
res = GetSystemDirectory(NULL, total-1);
@ -1024,10 +1023,8 @@ static void test_GetWindowsDirectory(void)
ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError());
total = res;
#if 0
/* this test crash on XP */
res = GetWindowsDirectory(NULL, total);
#endif
/* this crashes on XP */
if (0) res = GetWindowsDirectory(NULL, total);
SetLastError(0xdeadbeef);
res = GetWindowsDirectory(NULL, total-1);