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
b6b3fe10
Commit
b6b3fe10
authored
Sep 07, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for timers.
parent
0a6af139
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
0 deletions
+71
-0
.cvsignore
dlls/kernel/tests/.cvsignore
+1
-0
Makefile.in
dlls/kernel/tests/Makefile.in
+1
-0
timer.c
dlls/kernel/tests/timer.c
+69
-0
No files found.
dlls/kernel/tests/.cvsignore
View file @
b6b3fe10
...
...
@@ -22,4 +22,5 @@ profile.ok
testlist.c
thread.ok
time.ok
timer.ok
virtual.ok
dlls/kernel/tests/Makefile.in
View file @
b6b3fe10
...
...
@@ -28,6 +28,7 @@ CTESTS = \
profile.c
\
thread.c
\
time.c
\
timer.c
\
virtual.c
@MAKE_TEST_RULES@
...
...
dlls/kernel/tests/timer.c
0 → 100644
View file @
b6b3fe10
/*
* Unit test suite for time functions
*
* Copyright 2004 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/test.h"
#include "winbase.h"
typedef
HANDLE
(
WINAPI
*
fnCreateWaitableTimerA
)(
SECURITY_ATTRIBUTES
*
,
BOOL
,
LPSTR
);
typedef
BOOL
(
WINAPI
*
fnSetWaitableTimer
)(
HANDLE
,
LARGE_INTEGER
*
,
LONG
,
PTIMERAPCROUTINE
,
LPVOID
,
BOOL
);
void
test_timer
(
void
)
{
HMODULE
hker
=
GetModuleHandle
(
"kernel32"
);
fnCreateWaitableTimerA
pCreateWaitableTimerA
;
fnSetWaitableTimer
pSetWaitableTimer
;
HANDLE
handle
;
BOOL
r
;
LARGE_INTEGER
due
;
pCreateWaitableTimerA
=
(
fnCreateWaitableTimerA
)
GetProcAddress
(
hker
,
"CreateWaitableTimerA"
);
if
(
!
pCreateWaitableTimerA
)
return
;
pSetWaitableTimer
=
(
fnSetWaitableTimer
)
GetProcAddress
(
hker
,
"SetWaitableTimer"
);
if
(
!
pSetWaitableTimer
)
return
;
/* try once with a positive number */
handle
=
pCreateWaitableTimerA
(
NULL
,
0
,
NULL
);
ok
(
handle
!=
NULL
,
"failed to create waitable timer with no name
\n
"
);
due
.
QuadPart
=
10000
;
r
=
pSetWaitableTimer
(
handle
,
&
due
,
0x1f4
,
NULL
,
NULL
,
FALSE
);
ok
(
r
,
"failed to set timer
\n
"
);
CloseHandle
(
handle
);
/* try once with a negative number */
handle
=
pCreateWaitableTimerA
(
NULL
,
0
,
NULL
);
ok
(
handle
!=
NULL
,
"failed to create waitable timer with no name
\n
"
);
due
.
QuadPart
=
-
10000
;
r
=
pSetWaitableTimer
(
handle
,
&
due
,
0x1f4
,
NULL
,
NULL
,
FALSE
);
ok
(
r
,
"failed to set timer
\n
"
);
CloseHandle
(
handle
);
}
START_TEST
(
timer
)
{
test_timer
();
}
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