Commit 3f126b4a authored by Roy Shea's avatar Roy Shea Committed by Alexandre Julliard

qmgr: Implement IBackgroundCopyJob_GetType with test.

parent 7b297890
......@@ -133,8 +133,13 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_GetType(
IBackgroundCopyJob* iface,
BG_JOB_TYPE *pVal)
{
FIXME("Not implemented\n");
return E_NOTIMPL;
BackgroundCopyJobImpl *This = (BackgroundCopyJobImpl *) iface;
if (!pVal)
return E_INVALIDARG;
*pVal = This->type;
return S_OK;
}
static HRESULT WINAPI BITS_IBackgroundCopyJob_GetProgress(
......
......@@ -83,12 +83,29 @@ static void test_GetId(void)
ok(memcmp(&tmpId, &test_jobId, sizeof tmpId) == 0, "Got incorrect GUID\n");
}
/* Test that the type is properly set */
static void test_GetType(void)
{
HRESULT hres;
BG_JOB_TYPE type;
hres = IBackgroundCopyJob_GetType(test_job, &type);
ok(hres == S_OK, "GetType failed: %08x\n", hres);
if(hres != S_OK)
{
skip("Unable to get type of test_job.\n");
return;
}
ok(type == test_type, "Got incorrect type\n");
}
typedef void (*test_t)(void);
START_TEST(job)
{
static const test_t tests[] = {
test_GetId,
test_GetType,
0
};
const test_t *test;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment