[MSTASK_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Jul 2015 23:06:14 +0000 (23:06 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Jul 2015 23:06:14 +0000 (23:06 +0000)
svn path=/trunk/; revision=68464

rostests/winetests/mstask/task_scheduler.c

index 428bf8c..3bf660f 100644 (file)
@@ -203,6 +203,27 @@ static void test_SetTargetComputer(void)
     return;
 }
 
     return;
 }
 
+static void test_Enum(void)
+{
+    ITaskScheduler *scheduler;
+    IEnumWorkItems *tasks;
+    HRESULT hr;
+
+    hr = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER,
+            &IID_ITaskScheduler, (void **)&scheduler);
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+
+if (0) { /* crashes on win2k */
+    hr = ITaskScheduler_Enum(scheduler, NULL);
+    ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+}
+
+    hr = ITaskScheduler_Enum(scheduler, &tasks);
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+    IEnumWorkItems_Release(tasks);
+
+    ITaskScheduler_Release(scheduler);
+}
 
 START_TEST(task_scheduler)
 {
 
 START_TEST(task_scheduler)
 {
@@ -211,5 +232,6 @@ START_TEST(task_scheduler)
     test_Activate();
     test_GetTargetComputer();
     test_SetTargetComputer();
     test_Activate();
     test_GetTargetComputer();
     test_SetTargetComputer();
+    test_Enum();
     CoUninitialize();
 }
     CoUninitialize();
 }