Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
23210177
Commit
23210177
authored
May 25, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
May 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Get the tests running again on Win95.
parent
c77f02c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
sync.c
dlls/kernel32/tests/sync.c
+18
-5
No files found.
dlls/kernel32/tests/sync.c
View file @
23210177
...
...
@@ -26,6 +26,9 @@
#include "wine/test.h"
static
HANDLE
(
WINAPI
*
pCreateWaitableTimerA
)(
SECURITY_ATTRIBUTES
*
,
BOOL
,
LPCSTR
);
static
HANDLE
(
WINAPI
*
pOpenWaitableTimerA
)(
DWORD
,
BOOL
,
LPCSTR
);
static
void
test_signalandwait
(
void
)
{
DWORD
(
WINAPI
*
pSignalObjectAndWait
)(
HANDLE
,
HANDLE
,
DWORD
,
BOOL
);
...
...
@@ -376,32 +379,38 @@ static void test_waitable_timer(void)
{
HANDLE
handle
,
handle2
;
if
(
!
pCreateWaitableTimerA
||
!
pOpenWaitableTimerA
)
{
skip
(
"{Create,Open}WaitableTimerA() is not available
\n
"
);
return
;
}
/* test case sensitivity */
SetLastError
(
0xdeadbeef
);
handle
=
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
handle
=
p
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
ok
(
handle
!=
NULL
,
"CreateWaitableTimer failed with error %u
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0
,
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
handle2
=
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
handle2
=
p
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
ok
(
handle2
!=
NULL
,
"CreateWaitableTimer failed with error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
handle2
);
SetLastError
(
0xdeadbeef
);
handle2
=
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": TEST WAITABLETIMER"
);
handle2
=
p
CreateWaitableTimerA
(
NULL
,
FALSE
,
__FILE__
": TEST WAITABLETIMER"
);
ok
(
handle2
!=
NULL
,
"CreateWaitableTimer failed with error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0
,
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
handle2
);
SetLastError
(
0xdeadbeef
);
handle2
=
OpenWaitableTimerA
(
TIMER_ALL_ACCESS
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
handle2
=
p
OpenWaitableTimerA
(
TIMER_ALL_ACCESS
,
FALSE
,
__FILE__
": Test WaitableTimer"
);
ok
(
handle2
!=
NULL
,
"OpenWaitableTimer failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
handle2
);
SetLastError
(
0xdeadbeef
);
handle2
=
OpenWaitableTimerA
(
TIMER_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST WAITABLETIMER"
);
handle2
=
p
OpenWaitableTimerA
(
TIMER_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST WAITABLETIMER"
);
ok
(
!
handle2
,
"OpenWaitableTimer succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
...
...
@@ -519,6 +528,10 @@ static void test_iocp_callback(void)
START_TEST
(
sync
)
{
HMODULE
hdll
=
GetModuleHandle
(
"kernel32"
);
pCreateWaitableTimerA
=
(
void
*
)
GetProcAddress
(
hdll
,
"CreateWaitableTimerA"
);
pOpenWaitableTimerA
=
(
void
*
)
GetProcAddress
(
hdll
,
"OpenWaitableTimerA"
);
test_signalandwait
();
test_mutex
();
test_slist
();
...
...
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