2 * Speech API (SAPI) resource manager tests.
4 * Copyright 2020 Gijs Vermeulen
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
26 #include "wine/test.h"
28 static void test_interfaces(void)
30 ISpResourceManager
*resource_manager
, *resource_manager2
;
35 hr
= CoCreateInstance(&CLSID_SpResourceManager
, NULL
, CLSCTX_INPROC_SERVER
,
36 &IID_ISpResourceManager
, (void **)&resource_manager
);
37 ok(hr
== S_OK
, "Failed to create ISpeechVoice interface: %#x.\n", hr
);
38 ok(!!resource_manager
, "Expected non-NULL resource manager.\n");
40 hr
= CoCreateInstance(&CLSID_SpResourceManager
, NULL
, CLSCTX_INPROC_SERVER
,
41 &IID_ISpResourceManager
, (void **)&resource_manager2
);
42 ok(hr
== S_OK
, "Failed to create ISpeechVoice interface: %#x.\n", hr
);
43 ok(!!resource_manager2
, "Expected non-NULL resource manager.\n");
44 todo_wine
ok(resource_manager2
== resource_manager
, "Expected managers to match.\n");
45 ISpResourceManager_Release(resource_manager2
);
47 hr
= CoCreateInstance(&CLSID_SpResourceManager
, NULL
, CLSCTX_INPROC_SERVER
,
48 &IID_IUnknown
, (void **)&unk
);
49 ok(hr
== S_OK
, "Failed to create IUnknown interface: %#x.\n", hr
);
50 ok(!!unk
, "Expected non-NULL unk.\n");
51 todo_wine
ok(unk
== (IUnknown
*)resource_manager
, "Expected unk to match existing manager.\n");
52 IUnknown_Release(unk
);
54 hr
= CoCreateInstance(&CLSID_SpResourceManager
, NULL
, CLSCTX_INPROC_SERVER
,
55 &IID_IDispatch
, (void **)&dispatch
);
56 ok(hr
== E_NOINTERFACE
, "Succeeded to create IDispatch interface: %#x.\n", hr
);
57 ok(!dispatch
, "Expected NULL dispatch, got %p.", dispatch
);
59 ISpResourceManager_Release(resource_manager
);