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
41da56a0
Commit
41da56a0
authored
Aug 01, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Aug 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask/test: NewWorkItem conformance test.
parent
0f5d6827
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
Makefile.in
dlls/mstask/tests/Makefile.in
+13
-0
task_scheduler.c
dlls/mstask/tests/task_scheduler.c
+82
-0
No files found.
dlls/mstask/tests/Makefile.in
0 → 100644
View file @
41da56a0
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
mstask.dll
IMPORTS
=
ole32 kernel32
CTESTS
=
\
task_scheduler.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/mstask/tests/task_scheduler.c
0 → 100644
View file @
41da56a0
/*
* Test suite for TaskScheduler interface
*
* Copyright (C) 2008 Google (Roy Shea)
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "initguid.h"
#include "mstask.h"
#include "wine/test.h"
static
ITaskScheduler
*
test_task_scheduler
;
static
void
test_NewWorkItem
(
void
)
{
HRESULT
hres
;
ITask
*
task
;
const
WCHAR
task_name
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'g'
,
0
};
GUID
GUID_BAD
;
/* Initialize a GUID that will not be a recognized CLSID or a IID */
CoCreateGuid
(
&
GUID_BAD
);
/* 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. Skipping tests.
\n
"
);
return
;
}
/* Test basic task creation */
hres
=
ITaskScheduler_NewWorkItem
(
test_task_scheduler
,
task_name
,
&
CLSID_CTask
,
&
IID_ITask
,
(
IUnknown
**
)
&
task
);
todo_wine
ok
(
hres
==
S_OK
,
"NewNetworkItem failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
ITask_Release
(
task
);
/* Task creation attempt using invalid work item class ID */
hres
=
ITaskScheduler_NewWorkItem
(
test_task_scheduler
,
task_name
,
&
GUID_BAD
,
&
IID_ITask
,
(
IUnknown
**
)
&
task
);
todo_wine
ok
(
hres
==
CLASS_E_CLASSNOTAVAILABLE
,
"Expected CLASS_E_CLASSNOTAVAILABLE: %08x
\n
"
,
hres
);
/* Task creation attempt using invalid interface ID */
hres
=
ITaskScheduler_NewWorkItem
(
test_task_scheduler
,
task_name
,
&
CLSID_CTask
,
&
GUID_BAD
,
(
IUnknown
**
)
&
task
);
todo_wine
ok
(
hres
==
E_NOINTERFACE
,
"Expected E_NOINTERFACE: %08x
\n
"
,
hres
);
/* Task creation attempt using invalid work item class and interface ID */
hres
=
ITaskScheduler_NewWorkItem
(
test_task_scheduler
,
task_name
,
&
GUID_BAD
,
&
GUID_BAD
,
(
IUnknown
**
)
&
task
);
todo_wine
ok
(
hres
==
CLASS_E_CLASSNOTAVAILABLE
,
"Expected CLASS_E_CLASSNOTAVAILABLE: %08x
\n
"
,
hres
);
ITaskScheduler_Release
(
test_task_scheduler
);
return
;
}
START_TEST
(
task_scheduler
)
{
CoInitialize
(
NULL
);
test_NewWorkItem
();
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