From 7c5f411e7ae82dd1ff6569adbb2c4f9a76a58103 Mon Sep 17 00:00:00 2001 From: Roy Shea Date: Fri, 22 Aug 2008 12:52:46 -0700 Subject: [PATCH] mstask: Implemented CreateTrigger. --- dlls/mstask/task.c | 4 ++-- dlls/mstask/tests/task.c | 2 +- dlls/mstask/tests/task_trigger.c | 17 +++++++---------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 47a9b9af83b..3815b19747f 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -94,8 +94,8 @@ static HRESULT WINAPI MSTASK_ITask_CreateTrigger( WORD *piNewTrigger, ITaskTrigger **ppTrigger) { - FIXME("(%p, %p, %p): stub\n", iface, piNewTrigger, ppTrigger); - return E_NOTIMPL; + TRACE("(%p, %p, %p)\n", iface, piNewTrigger, ppTrigger); + return TaskTriggerConstructor((LPVOID *)ppTrigger); } static HRESULT WINAPI MSTASK_ITask_DeleteTrigger( diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 9e4dfe27a09..a5f2d0ae1d0 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -218,7 +218,7 @@ static void test_CreateTrigger(void) } hres = ITask_CreateTrigger(test_task, &trigger_index, &test_trigger); - todo_wine ok(hres == S_OK, "Failed to create trigger: 0x%08x\n", hres); + ok(hres == S_OK, "Failed to create trigger: 0x%08x\n", hres); if (hres != S_OK) { cleanup_task(); diff --git a/dlls/mstask/tests/task_trigger.c b/dlls/mstask/tests/task_trigger.c index 398494fa7cc..cbd652cfd70 100644 --- a/dlls/mstask/tests/task_trigger.c +++ b/dlls/mstask/tests/task_trigger.c @@ -66,7 +66,7 @@ static void cleanup_trigger(void) static BOOL compare_trigger_state(TASK_TRIGGER found_state, TASK_TRIGGER expected_state) { - todo_wine ok(found_state.cbTriggerSize == expected_state.cbTriggerSize, + ok(found_state.cbTriggerSize == expected_state.cbTriggerSize, "cbTriggerSize: Found %d but expected %d\n", found_state.cbTriggerSize, expected_state.cbTriggerSize); @@ -162,7 +162,7 @@ static void test_SetTrigger_GetTrigger(void) SYSTEMTIME time; setup = setup_trigger(); - todo_wine ok(setup, "Failed to setup test_task\n"); + ok(setup, "Failed to setup test_task\n"); if (!setup) { skip("Failed to create task. Skipping tests.\n"); @@ -182,8 +182,7 @@ static void test_SetTrigger_GetTrigger(void) trigger_state.cbTriggerSize = sizeof(trigger_state); hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); todo_wine ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - todo_wine ok(compare_trigger_state(trigger_state, empty_trigger_state), - "Invalid state\n"); + compare_trigger_state(trigger_state, empty_trigger_state); /* Test setting basic empty trigger */ hres = ITaskTrigger_SetTrigger(test_trigger, &empty_trigger_state); @@ -192,8 +191,7 @@ static void test_SetTrigger_GetTrigger(void) trigger_state.cbTriggerSize = sizeof(trigger_state); hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); todo_wine ok(hres == S_OK, "Failed to GetTrigger\n"); - todo_wine ok(compare_trigger_state(trigger_state, empty_trigger_state), - "Invalid state\n"); + compare_trigger_state(trigger_state, empty_trigger_state); /* Test setting basic non-empty trigger */ hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); @@ -202,8 +200,7 @@ static void test_SetTrigger_GetTrigger(void) trigger_state.cbTriggerSize = sizeof(trigger_state); hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); todo_wine ok(hres == S_OK, "Failed to GetTrigger\n"); - todo_wine ok(compare_trigger_state(trigger_state, normal_trigger_state), - "Invalid state\n"); + compare_trigger_state(trigger_state, normal_trigger_state); /* The following tests modify the normal_trigger_state structure * before each test, and return the normal_trigger_state structure @@ -331,10 +328,10 @@ static void test_SetTrigger_GetTrigger(void) memset(&trigger_state, 0xcf, sizeof(trigger_state)); trigger_state.cbTriggerSize = sizeof(trigger_state); hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - todo_wine ok(trigger_state.Type.Weekly.WeeksInterval == 0xcfcf, + ok(trigger_state.Type.Weekly.WeeksInterval == 0xcfcf, "Expected WeeksInterval set remain untouched: %d\n", trigger_state.Type.Weekly.WeeksInterval); - todo_wine ok(trigger_state.Type.Weekly.rgfDaysOfTheWeek == 0xcfcf, + ok(trigger_state.Type.Weekly.rgfDaysOfTheWeek == 0xcfcf, "Expected WeeksInterval set remain untouched: %d\n", trigger_state.Type.Weekly.rgfDaysOfTheWeek); normal_trigger_state.TriggerType = TASK_TIME_TRIGGER_DAILY;