oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Wed Aug 29 04:18:04 CDT 2012
Hi,
Changelog:
oleaut32: Add VT_BSTR to VT_UI2|VT_ARRAY test
Best Regards
Alistair Leslie-Hughes
-------------- next part --------------
>From f162fcf5b9e0c54ddc430d1281f3fb761fb57330 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Fri, 17 Aug 2012 10:21:25 +1000
Subject: [PATCH] VT_BSTR to VT_UI2|VT_ARRAY test
To: wine-patches <wine-patches at winehq.org>
---
dlls/oleaut32/tests/safearray.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
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");
--
1.7.9.5
More information about the wine-patches
mailing list