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
714c6d3a
Commit
714c6d3a
authored
Aug 20, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask/tests: Conformance test for (Set|Get)MaxRunTime.
parent
7cca2142
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
task.c
dlls/mstask/tests/task.c
+58
-0
No files found.
dlls/mstask/tests/task.c
View file @
714c6d3a
...
...
@@ -370,6 +370,63 @@ static void test_SetComment_GetComment(void)
return
;
}
static
void
test_SetMaxRunTime_GetMaxRunTime
(
void
)
{
BOOL
setup
;
HRESULT
hres
;
DWORD
max_run_time
;
setup
=
setup_task
();
ok
(
setup
,
"Failed to setup test_task
\n
"
);
if
(
!
setup
)
{
skip
(
"Failed to create task. Skipping tests.
\n
"
);
return
;
}
/* Default time is 3 days:
* 3 days * 24 hours * 60 minutes * 60 seconds * 1000 ms = 259200000 */
max_run_time
=
0
;
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
259200000
,
"Expected 259200000: %d
\n
"
,
max_run_time
);
/* Basic set test */
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
1234
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
1234
,
"Expected 1234: %d
\n
"
,
max_run_time
);
/* Verify that time can be set to zero */
max_run_time
=
1
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
0
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
0
,
"Expected 0: %d
\n
"
,
max_run_time
);
/* Check resolution by setting time to one */
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
1
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
1
,
"Expected 1: %d
\n
"
,
max_run_time
);
/* Verify that time can be set to INFINITE */
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
INFINITE
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
INFINITE
,
"Expected INFINITE: %d
\n
"
,
max_run_time
);
cleanup_task
();
return
;
}
START_TEST
(
task
)
{
CoInitialize
(
NULL
);
...
...
@@ -377,5 +434,6 @@ START_TEST(task)
test_CreateTrigger
();
test_SetParameters_GetParameters
();
test_SetComment_GetComment
();
test_SetMaxRunTime_GetMaxRunTime
();
CoUninitialize
();
}
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