Roy Shea : mstask: Activate conformance test.
Module: wine Branch: master Commit: 75e043ee5f7b5fbf43d74ce561cd0764e51d806a URL: http://source.winehq.org/git/wine.git/?a=commit;h=75e043ee5f7b5fbf43d74ce561... Author: Roy Shea <royshea(a)gmail.com> Date: Mon Aug 18 17:23:10 2008 -0700 mstask: Activate conformance test. --- dlls/mstask/tests/task_scheduler.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/mstask/tests/task_scheduler.c b/dlls/mstask/tests/task_scheduler.c index 5292a3c..d115dd2 100644 --- a/dlls/mstask/tests/task_scheduler.c +++ b/dlls/mstask/tests/task_scheduler.c @@ -20,6 +20,8 @@ #define COBJMACROS +#include "corerror.h" + #include "initguid.h" #include "mstask.h" #include "wine/test.h" @@ -74,9 +76,36 @@ static void test_NewWorkItem(void) return; } +static void test_Activate(void) +{ + HRESULT hres; + ITask *task = NULL; + const WCHAR not_task_name[] = + {'N', 'o', 'S', 'u', 'c', 'h', 'T', 'a', 's', 'k', 0}; + + /* 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; + } + + /* Attempt to Activate a non-existant task */ + hres = ITaskScheduler_Activate(test_task_scheduler, not_task_name, + &IID_ITask, (IUnknown**)&task); + todo_wine ok(hres == COR_E_FILENOTFOUND, "Expected COR_E_FILENOTFOUND: %08x\n", hres); + + ITaskScheduler_Release(test_task_scheduler); + return; +} + START_TEST(task_scheduler) { CoInitialize(NULL); test_NewWorkItem(); + test_Activate(); CoUninitialize(); }
participants (1)
-
Alexandre Julliard