https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8bc8ae005fee89dec0faa1407cf8fd64d2d1d230

commit 8bc8ae005fee89dec0faa1407cf8fd64d2d1d230
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sat Feb 2 13:29:12 2019 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sat Feb 2 13:29:12 2019 +0100

    [PROPSYS_WINETEST] Sync with Wine Staging 4.0. CORE-15682
---
 modules/rostests/winetests/propsys/propstore.c |  1 +
 modules/rostests/winetests/propsys/propsys.c   | 25 ++++++++++++++++++++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/modules/rostests/winetests/propsys/propstore.c 
b/modules/rostests/winetests/propsys/propstore.c
index 01500dd3f9..3fe8613a8b 100644
--- a/modules/rostests/winetests/propsys/propstore.c
+++ b/modules/rostests/winetests/propsys/propstore.c
@@ -214,6 +214,7 @@ static void test_persistserialized(void)
 
     if (FAILED(hr))
     {
+        IPropertyStore_Release(propstore);
         skip("IPersistSerializedPropStorage not supported\n");
         return;
     }
diff --git a/modules/rostests/winetests/propsys/propsys.c 
b/modules/rostests/winetests/propsys/propsys.c
index a6c7023527..34c51b382b 100644
--- a/modules/rostests/winetests/propsys/propsys.c
+++ b/modules/rostests/winetests/propsys/propsys.c
@@ -133,7 +133,7 @@ static void test_PSStringFromPropertyKey(void)
 
     int i;
 
-    for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
+    for (i = 0; i < ARRAY_SIZE(testcases); i++)
     {
         if (testcases[i].psz)
             memcpy(testcases[i].psz, fillerW, PKEYSTR_MAX * sizeof(WCHAR));
@@ -413,7 +413,7 @@ static void test_PSPropertyKeyFromString(void)
 
     int i;
 
-    for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
+    for (i = 0; i < ARRAY_SIZE(testcases); i++)
     {
         if (testcases[i].pkey)
             *testcases[i].pkey = out_init;
@@ -480,7 +480,7 @@ static void test_InitPropVariantFromGUIDAsString(void)
         InitVariantFromGUIDAsString(&IID_NULL, NULL);
     }
 
-    for(i=0; i<sizeof(testcases)/sizeof(testcases[0]); i++) {
+    for(i=0; i < ARRAY_SIZE(testcases); i++) {
         memset(&propvar, 0, sizeof(PROPVARIANT));
         hres = InitPropVariantFromGUIDAsString(testcases[i].guid, &propvar);
         ok(hres == S_OK, "%d) InitPropVariantFromGUIDAsString returned %x\n", 
i, hres);
@@ -1230,6 +1230,24 @@ static void test_PropVariantChangeType_LPWSTR(void)
     PropVariantClear(&src);
 }
 
+static void test_InitPropVariantFromCLSID(void)
+{
+    PROPVARIANT propvar;
+    GUID clsid;
+    HRESULT hr;
+
+    memset(&propvar, 0, sizeof(propvar));
+    propvar.vt = VT_I4;
+    propvar.u.lVal = 15;
+
+    memset(&clsid, 0xcc, sizeof(clsid));
+    hr = InitPropVariantFromCLSID(&clsid, &propvar);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    ok(propvar.vt == VT_CLSID, "Unexpected type %d.\n", propvar.vt);
+    ok(IsEqualGUID(propvar.u.puuid, &clsid), "Unexpected puuid value.\n");
+    PropVariantClear(&propvar);
+}
+
 START_TEST(propsys)
 {
     test_PSStringFromPropertyKey();
@@ -1244,4 +1262,5 @@ START_TEST(propsys)
     test_PropVariantChangeType_LPWSTR();
     test_PropVariantToBoolean();
     test_PropVariantToStringWithDefault();
+    test_InitPropVariantFromCLSID();
 }

Reply via email to