André Hentschel : oleaut32/tests: Skip tests if typelib can't be registered.

Alexandre Julliard julliard at winehq.org
Thu Aug 4 12:22:09 CDT 2011


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Aug  3 19:48:01 2011 +0200

oleaut32/tests: Skip tests if typelib can't be registered.

---

 dlls/oleaut32/tests/tmarshal.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 2897c1f..c2b36a5 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -995,13 +995,10 @@ static void test_typelibmarshal(void)
     ok_ole_success(hr, CoUnmarshalInterface);
     IStream_Release(pStream);
 
-    if (hr == S_OK)
-    {
-        hr = IKindaEnumWidget_Next(pKEW, &pWidget);
-        ok_ole_success(hr, IKindaEnumWidget_Next);
+    hr = IKindaEnumWidget_Next(pKEW, &pWidget);
+    ok_ole_success(hr, IKindaEnumWidget_Next);
 
-        IKindaEnumWidget_Release(pKEW);
-    }
+    IKindaEnumWidget_Release(pKEW);
 
     hr = IWidget_QueryInterface(pWidget, &IID_IDispatch, (void **)&pDispatch);
     ok_ole_success(hr, IWidget_QueryInterface);
@@ -1547,7 +1544,12 @@ START_TEST(tmarshal)
     CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
 
     hr = register_current_module_typelib();
-    ok_ole_success(hr, register_current_module_typelib);
+    if (FAILED(hr))
+    {
+        CoUninitialize();
+        win_skip("Registration of the test typelib failed, skipping tests\n");
+        return;
+    }
 
     test_typelibmarshal();
     test_DispCallFunc();




More information about the wine-cvs mailing list