Paul Vriens : ole32/tests: Only skip the tests if we are on NT4 or below.

Alexandre Julliard julliard at winehq.org
Tue Jun 10 13:35:23 CDT 2008


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Tue Jun 10 14:42:50 2008 +0200

ole32/tests: Only skip the tests if we are on NT4 or below.

---

 dlls/ole32/tests/ole2.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c
index 7ddbe78..8d72b15 100644
--- a/dlls/ole32/tests/ole2.c
+++ b/dlls/ole32/tests/ole2.c
@@ -1130,8 +1130,8 @@ static void test_data_cache(void)
     hr = IOleCache_Uncache(pOleCache, 0xdeadbeef);
     ok(hr == OLE_E_NOCONNECTION, "IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%x\n", hr);
 
-    /* Both tests crash on NT4 and below */
-    if (0)
+    /* Both tests crash on NT4 and below. StgCreatePropSetStg is only available on w2k and above. */
+    if (GetProcAddress(GetModuleHandleA("ole32.dll"), "StgCreatePropSetStg"))
     {
         hr = IOleCache_Cache(pOleCache, NULL, 0, &dwConnection);
         ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08x\n", hr);
@@ -1139,6 +1139,10 @@ static void test_data_cache(void)
         hr = IOleCache_Cache(pOleCache, NULL, 0, NULL);
         ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08x\n", hr);
     }
+    else
+    {
+        skip("tests with NULL parameters will crash on NT4 and below\n");
+    }
 
     for (fmtetc.cfFormat = CF_TEXT; fmtetc.cfFormat < CF_MAX; fmtetc.cfFormat++)
     {




More information about the wine-cvs mailing list