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. ;)
Howdy,
- const GUID invalid_id = {0x00000000, 0x0000, 0x0000,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
You can use GUID_NULL and eliminate this local.
After looking at other tests in wine I decided to use DEFINE_GUID to declare my own GUID_NULL for the test. This allows me to avoid linking uuid into the test for a single GUID.
I've sent in a revised patch set with this revision and the other revisions mentioned.
Thanks for the comments! -Roy