#include <stdarg.h>
#include <math.h>
#include "windef.h"
#include "objbase.h"
#include "wincodec.h"
#include "wincodecsdk.h"
#include "wine/test.h"
Go to the source code of this file.
|
static const WCHAR | wszTestProperty1 [] = {'P','r','o','p','e','r','t','y','1',0} |
|
static const WCHAR | wszTestProperty2 [] = {'P','r','o','p','e','r','t','y','2',0} |
|
static const WCHAR | wszTestInvalidProperty [] = {'I','n','v','a','l','i','d',0} |
|
◆ COBJMACROS
◆ CONST_VTABLE
◆ START_TEST()
START_TEST |
( |
propertybag |
| ) |
|
Definition at line 283 of file propertybag.c.
284{
286
288
290
292}
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static void test_empty_propertybag(void)
static void test_filled_propertybag(void)
@ COINIT_APARTMENTTHREADED
◆ test_empty_propertybag()
static void test_empty_propertybag |
( |
void |
| ) |
|
|
static |
Definition at line 227 of file propertybag.c.
228{
232
234 &IID_IWICComponentFactory, (
void**)&
factory);
235 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
236
238
239 ok(
hr ==
S_OK,
"Creating EncoderPropertyBag failed, hr=%x\n",
hr);
241
243
245
247
248 IWICComponentFactory_Release(
factory);
249}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
static void test_propertybag_countproperties(IPropertyBag2 *property, ULONG expected_count)
static void test_propertybag_getpropertyinfo(IPropertyBag2 *property, ULONG expected_count)
Referenced by START_TEST().
◆ test_filled_propertybag()
static void test_filled_propertybag |
( |
void |
| ) |
|
|
static |
Definition at line 251 of file propertybag.c.
252{
256 PROPBAG2 opts[2]= {
259 };
260
262 &IID_IWICComponentFactory, (
void**)&
factory);
263 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
264
266
267 ok(
hr ==
S_OK,
"Creating EncoderPropertyBag failed, hr=%x\n",
hr);
269
271
273
275
277
279
280 IWICComponentFactory_Release(
factory);
281}
static void test_propertybag_read(IPropertyBag2 *property)
static const WCHAR wszTestProperty1[]
static void test_propertybag_write(IPropertyBag2 *property)
static const WCHAR wszTestProperty2[]
Referenced by START_TEST().
◆ test_propertybag_countproperties()
◆ test_propertybag_getpropertyinfo()
Definition at line 35 of file propertybag.c.
36{
38 PROPBAG2 pb[2];
40
41
44 "GetPropertyInfo handled iProperty out of bounce wrong, hr=%x\n",
hr);
45
46
49 "GetPropertyInfo handled cProperty out of bounce wrong, hr=%x\n",
hr);
50
51
53 return;
54
56 ok(
hr ==
S_OK,
"GetPropertyInfo failed, hr=%x\n",
hr);
58 return;
59
61 "GetPropertyInfo returned unexpected property count, %i != %i)\n",
63
65 return;
66
67 ok(pb[0].
vt ==
VT_UI1,
"Invalid variant type, pb[0].vt=%x\n", pb[0].
vt);
68 ok(pb[0].dwType == PROPBAG2_TYPE_DATA,
"Invalid variant type, pb[0].dwType=%x\n", pb[0].dwType);
71
72 ok(pb[1].
vt ==
VT_R4,
"Invalid variant type, pb[1].vt=%x\n", pb[1].
vt);
73 ok(pb[1].dwType == PROPBAG2_TYPE_DATA,
"Invalid variant type, pb[1].dwType=%x\n", pb[1].dwType);
76}
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
VOID WINAPI CoTaskMemFree(LPVOID ptr)
static UINT UINT * out_count
#define WINCODEC_ERR_VALUEOUTOFRANGE
Referenced by test_empty_propertybag(), and test_filled_propertybag().
◆ test_propertybag_read()
Definition at line 95 of file propertybag.c.
96{
101
102
106 "Read for an unknown property did not fail with expected code, hr=%x\n",
hr);
107
108
114 {
116 "Read failed, itm_hr[0]=%x\n", itm_hr[0]);
118 "Read failed, V_VT(&values[0])=%x\n",
V_VT(&
values[0]));
121
123 }
124
125
133 {
134 ok(itm_hr[0] ==
S_OK,
"Read failed, itm_hr[0]=%x\n", itm_hr[0]);
137
138 ok(itm_hr[1] ==
S_OK,
"Read failed, itm_hr[1]=%x\n", itm_hr[1]);
141
144 }
145
146
147
148
149
150 itm_hr[0] = -1; itm_hr[1] = -1; itm_hr[2] = -1;
157
161
165 {
166 ok(itm_hr[0] ==
S_OK,
"Read error code has unexpected value, itm_hr[0]=%x\n", itm_hr[0]);
167 ok(itm_hr[1] == -1,
"Read error code has unexpected value, itm_hr[1]=%x\n", itm_hr[1]);
168 ok(itm_hr[2] == -1,
"Read error code has unexpected value, itm_hr[2]=%x\n", itm_hr[2]);
169
173
177 }
178}
GLboolean GLenum GLenum GLvoid * values
static const WCHAR wszTestInvalidProperty[]
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Referenced by test_filled_propertybag().
◆ test_propertybag_write()
Definition at line 180 of file propertybag.c.
181{
185
188
189
192 ok(
hr ==
E_FAIL,
"Write for an unknown property did not fail with expected code, hr=%x\n",
hr);
193
194
199 ok(
hr ==
S_OK,
"Write for one property failed, hr=%x\n",
hr);
200
201
207 "Write with mismatching type did not fail with expected code hr=%x\n",
hr);
208
209
214 "Write to reset to empty value does not fail with expected code, hr=%x\n",
hr);
215
216
224 ok(
hr ==
S_OK,
"Write for two properties failed, hr=%x\n",
hr);
225}
static float(__cdecl *square_half_float)(float x
void WINAPI VariantInit(VARIANTARG *pVarg)
#define WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE
Referenced by test_filled_propertybag().
◆ wszTestInvalidProperty
◆ wszTestProperty1
◆ wszTestProperty2