Alistair Leslie-Hughes : oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test.

Alexandre Julliard julliard at winehq.org
Wed Aug 29 15:01:38 CDT 2012


Module: wine
Branch: master
Commit: 87fabd100978895327190562f88c37297c13c539
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=87fabd100978895327190562f88c37297c13c539

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Aug 17 10:21:25 2012 +1000

oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test.

---

 dlls/oleaut32/tests/safearray.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c
index c484bb8..b689334 100644
--- a/dlls/oleaut32/tests/safearray.c
+++ b/dlls/oleaut32/tests/safearray.c
@@ -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");




More information about the wine-cvs mailing list