Alfred Agrell (@Alcaro) commented about dlls/taskschd/tests/scheduler.c:
- hr = IRegisteredTaskCollection_get_Item(tasks, index, NULL);
- ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
- index.uiVal = 0;
- hr = IRegisteredTaskCollection_get_Item(tasks, index, &ret_task1);
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
- index.uiVal = 2;
- hr = IRegisteredTaskCollection_get_Item(tasks, index, &ret_task1);
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
- index.uiVal = 1;
- hr = IRegisteredTaskCollection_get_Item(tasks, index, &ret_task1);
- ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
- if (hr == S_OK)
If the ok() passes on everything, then the if is unnecessary. (And if it doesn't, you should add a broken() or win_skip() somewhere.)