2 * Unit test suite for bits functions
4 * Copyright 2007 Google (Roy Shea)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/test.h"
30 test_CreateInstance(void)
34 IBackgroundCopyManager
*manager
= NULL
;
36 /* Creating BITS instance */
37 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
, CLSCTX_LOCAL_SERVER
,
38 &IID_IBackgroundCopyManager
, (void **) &manager
);
39 ok(hres
== S_OK
, "CoCreateInstance failed: %08x\n", hres
);
41 skip("Unable to create bits instance.\n");
45 /* Releasing bits manager */
46 res
= IBackgroundCopyManager_Release(manager
);
47 ok(res
== 0, "Bad ref count on release: %u\n", res
);
51 static void test_CreateJob(void)
54 static const WCHAR copyNameW
[] = {'T', 'e', 's', 't', 0};
55 IBackgroundCopyJob
* job
= NULL
;
59 IBackgroundCopyManager
* manager
= NULL
;
62 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
63 CLSCTX_LOCAL_SERVER
, &IID_IBackgroundCopyManager
,
67 skip("Unable to create bits instance required for test.\n");
72 hres
= IBackgroundCopyManager_CreateJob(manager
, copyNameW
,
73 BG_JOB_TYPE_DOWNLOAD
, &tmpId
,
75 ok(hres
== S_OK
, "CreateJob failed: %08x\n", hres
);
77 skip("Unable to create bits job.\n");
80 res
= IBackgroundCopyJob_Release(job
);
81 ok(res
== 0, "Bad ref count on release: %u\n", res
);
84 IBackgroundCopyManager_Release(manager
);
90 test_CreateInstance();