Commit 87fabd10 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test.

parent ae0b830c
......@@ -294,7 +294,7 @@ static void test_safearray(void)
LONG indices[2];
HRESULT hres;
SAFEARRAYBOUND bound, bounds[2];
VARIANT v;
VARIANT v,d;
LPVOID data;
IID iid;
VARTYPE vt;
......@@ -557,6 +557,15 @@ static void test_safearray(void)
ok(V_BSTR(&v)[0] == 0x6548,"First letter are not 'He', but %x\n", V_BSTR(&v)[0]);
VariantClear(&v);
VariantInit(&d);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocStringLen(NULL, 0);
hres = VariantChangeTypeEx(&d, &v, 0, 0, VT_UI1|VT_ARRAY);
ok(hres==S_OK, "CTE VT_BSTR -> VT_UI1|VT_ARRAY failed with %x\n",hres);
ok(V_VT(&d) == (VT_UI1|VT_ARRAY),"CTE BSTR -> VT_UI1|VT_ARRAY did not return VT_UI1|VT_ARRAY, but %d.v\n",V_VT(&v));
VariantClear(&v);
VariantClear(&d);
/* check locking functions */
a = SafeArrayCreate(VT_I4, 1, &bound);
ok(a!=NULL,"SAC should not fail\n");
......
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