stop endless mapi test error messages

Ferenc Wagner wferi at afavant.elte.hu
Mon Aug 16 13:07:01 CDT 2004


Changelog: Terminate test loop on the first error to avoid
           excessive log volume.

Feri.

Index: dlls/mapi32/tests/prop.c
===================================================================
RCS file: /home/wine/wine/dlls/mapi32/tests/prop.c,v
retrieving revision 1.3
diff -u -r1.3 prop.c
--- dlls/mapi32/tests/prop.c	6 Jul 2004 21:02:51 -0000	1.3
+++ dlls/mapi32/tests/prop.c	16 Aug 2004 18:04:33 -0000
@@ -656,13 +656,14 @@
     GUID iids[4], *iid = iids;
     SCODE res;
     ULONG pt, exp, ulRet;
+    int success = 1;
 
     pScCountProps = (void*)GetProcAddress(hMapi32, "ScCountProps at 12");
 
     if (!pScCountProps)
         return;
 
-    for (pt = 0; pt < PROP_ID_INVALID; pt++)
+    for (pt = 0; pt < PROP_ID_INVALID && success; pt++)
     {
         SPropValue pv;
 
@@ -771,12 +772,16 @@
 
         ulRet = 0xffffffff;
         res = pScCountProps(1, &pv, &ulRet);
-        if (!exp)
-            ok(res == MAPI_E_INVALID_PARAMETER && ulRet == 0xffffffff,
-               "pt= %ld: Expected failure, got %ld, ret=0x%08lX\n", pt, ulRet, res);
-        else
-            ok(res == S_OK && ulRet == exp, "pt= %ld: Expected %ld, got %ld, ret=0x%08lX\n", 
+        if (!exp) {
+            success = res == MAPI_E_INVALID_PARAMETER && ulRet == 0xffffffff;
+            ok(success, "pt= %ld: Expected failure, got %ld, ret=0x%08lX\n",
+               pt, ulRet, res);
+        }
+        else {
+            success = res == S_OK && ulRet == exp;
+            ok(success, "pt= %ld: Expected %ld, got %ld, ret=0x%08lX\n", 
                pt, exp, ulRet, res);
+        }
     }
 
 }



More information about the wine-patches mailing list