Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9299c498
Commit
9299c498
authored
Jan 06, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Replace some '#if 0's with 'if (0)'s.
Fix the code so it compiles without warnings.
parent
7a76ae1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
17 deletions
+15
-17
console.c
dlls/kernel32/tests/console.c
+2
-3
file.c
dlls/kernel32/tests/file.c
+8
-6
path.c
dlls/kernel32/tests/path.c
+5
-8
No files found.
dlls/kernel32/tests/console.c
View file @
9299c498
...
@@ -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
);
...
...
dlls/kernel32/tests/file.c
View file @
9299c498
...
@@ -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
);
...
...
dlls/kernel32/tests/path.c
View file @
9299c498
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment