Andrew Bogott : ole32: Fix the test for arbitrary property ids.

Alexandre Julliard julliard at winehq.org
Wed Dec 1 12:56:46 CST 2010


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

Author: Andrew Bogott <andrew at CodeWeavers.com>
Date:   Sat Nov 20 13:47:31 2010 -0600

ole32: Fix the test for arbitrary property ids.

---

 dlls/ole32/tests/stg_prop.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/tests/stg_prop.c b/dlls/ole32/tests/stg_prop.c
index 4e5fde7..77f0d7c 100644
--- a/dlls/ole32/tests/stg_prop.c
+++ b/dlls/ole32/tests/stg_prop.c
@@ -315,13 +315,18 @@ static void testProps(void)
 
     spec.ulKind = PRSPEC_PROPID;
     U(spec).propid = PID_FIRST_USABLE;
+    var.vt = VT_I4;
     U(var).lVal = 1;
     hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0);
     ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr);
 
+    hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT);
+    ok(hr == S_OK, "Commit failed: 0x%08x\n", hr);
+
     IPropertyStorage_Release(propertyStorage);
     IPropertySetStorage_Release(propSetStorage);
     IStorage_Release(storage);
+    propertyStorage = NULL;
 
     /* now open it again */
     hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE,
@@ -333,13 +338,16 @@ static void testProps(void)
 
     hr = IPropertySetStorage_Open(propSetStorage, &anyOldGuid,
      STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage);
-    todo_wine
     ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr);
 
     spec.ulKind = PRSPEC_PROPID;
     U(spec).propid = PID_FIRST_USABLE;
     hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var);
-    ok(hr == S_FALSE, "ReadMultiple failed: 0x%08x\n", hr);
+    ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr);
+
+    ok(var.vt == VT_I4 && U(var).lVal == 1,
+     "Didn't get expected type or value for property (got type %d, value %d)\n",
+     var.vt, U(var).lVal);
 
     IPropertyStorage_Release(propertyStorage);
     IPropertySetStorage_Release(propSetStorage);




More information about the wine-cvs mailing list