From 494ea8106eba45b5558bb6bc95dfba710109b824 Mon Sep 17 00:00:00 2001 From: Ferenc Wagner Date: Mon, 16 Aug 2004 23:18:48 +0000 Subject: [PATCH] Terminate test loop on the first error to avoid excessive log volume. --- dlls/mapi32/tests/prop.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/mapi32/tests/prop.c b/dlls/mapi32/tests/prop.c index 8766fdd7497..4eba42873dc 100644 --- a/dlls/mapi32/tests/prop.c +++ b/dlls/mapi32/tests/prop.c @@ -656,13 +656,14 @@ static void test_ScCountProps(void) GUID iids[4], *iid = iids; SCODE res; ULONG pt, exp, ulRet; + int success = 1; pScCountProps = (void*)GetProcAddress(hMapi32, "ScCountProps@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 @@ static void test_ScCountProps(void) 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); + } } } -- 2.11.4.GIT