Hey Roy, On Tue, Jul 29, 2008 at 04:44:45PM -0700, Roy Shea wrote: > +static BOOL setup_task_scheduler() > +{ > + HRESULT hres; > + > + hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, > CLSCTX_INPROC_SERVER, > + &IID_ITaskScheduler, (void **) &test_task_scheduler); > + return hres == S_OK; > +}
You should do an "ok" check on this so that if it fails, the tests fail, since this is part of the module you're testing. > +static void test_NewWorkItem() > +{ > + HRESULT hres; > + ITask *task; > + const WCHAR task_name[] = {'T', 'e', 's', 't', 'i', 'n', 'g', 0}; > + const GUID invalid_id = {0x00000000, 0x0000, 0x0000, > + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; You can use GUID_NULL and eliminate this local. > + if (!setup_task_scheduler()) > + { > + skip("Failed to create task scheduler. Skipping tests.\n"); > + goto out; > + } Why goto-return when you can just return? I thought we hated gotos. ;)