oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test.

This commit is contained in:
Alistair Leslie-Hughes 2012-08-17 10:21:25 +10:00 committed by Alexandre Julliard
parent ae0b830cf1
commit 87fabd1009
1 changed files with 10 additions and 1 deletions

View File

@ -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");