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
48ddbde7
Commit
48ddbde7
authored
Nov 06, 2012
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask/tests: Add tests for GetTargetComputer.
parent
493d8589
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
task_scheduler.c
dlls/mstask/tests/task_scheduler.c
+33
-0
No files found.
dlls/mstask/tests/task_scheduler.c
View file @
48ddbde7
...
...
@@ -102,10 +102,43 @@ static void test_Activate(void)
return
;
}
static
void
test_GetTargetComputer
(
void
)
{
HRESULT
hres
;
WCHAR
*
oldname
;
/* Create TaskScheduler */
hres
=
CoCreateInstance
(
&
CLSID_CTaskScheduler
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ITaskScheduler
,
(
void
**
)
&
test_task_scheduler
);
ok
(
hres
==
S_OK
,
"CTaskScheduler CoCreateInstance failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Failed to create task scheduler.
\n
"
);
return
;
}
if
(
0
)
{
/* This crashes on w2k */
hres
=
ITaskScheduler_GetTargetComputer
(
test_task_scheduler
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hres
);
}
hres
=
ITaskScheduler_GetTargetComputer
(
test_task_scheduler
,
&
oldname
);
ok
((
hres
==
S_OK
)
&&
oldname
&&
oldname
[
0
]
==
'\\'
&&
oldname
[
1
]
==
'\\'
&&
oldname
[
2
],
"got 0x%x and %s (expected S_OK and an unc name)
\n
"
,
hres
,
wine_dbgstr_w
(
oldname
));
CoTaskMemFree
(
oldname
);
ITaskScheduler_Release
(
test_task_scheduler
);
return
;
}
START_TEST
(
task_scheduler
)
{
CoInitialize
(
NULL
);
test_NewWorkItem
();
test_Activate
();
test_GetTargetComputer
();
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