=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: shell32/tests: Use todo_wine_if() in tests.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 22 08:57:38 CST 2016


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Sat Feb 20 14:04:30 2016 +0100

shell32/tests: Use todo_wine_if() in tests.

Signed-off-by: Frédéric Delanoy <frederic.delanoy at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/tests/progman_dde.c | 11 +----------
 dlls/shell32/tests/shelllink.c   | 18 +++---------------
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/dlls/shell32/tests/progman_dde.c b/dlls/shell32/tests/progman_dde.c
index 4c9116e..6e1378f 100644
--- a/dlls/shell32/tests/progman_dde.c
+++ b/dlls/shell32/tests/progman_dde.c
@@ -486,19 +486,10 @@ static HWND ShowGroupTest(DWORD instance, HCONV hConv, const char *command, UINT
     DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
 /* todo_wine...  Is expected to fail, wine stubbed functions DO fail */
 /* TODO REMOVE THIS CODE!!! */
-    if (expected_result == DMLERR_NOTPROCESSED)
-    {
+    todo_wine_if (expected_result != DMLERR_NOTPROCESSED)
         ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n",
             groupName, GetStringFromError(expected_result), GetStringFromError(error),
             GetStringFromTestParams(testParams));
-    } else {
-        todo_wine
-        {
-            ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n",
-                groupName, GetStringFromError(expected_result), GetStringFromError(error),
-                GetStringFromTestParams(testParams));
-        }
-    }
 
     if (error == DMLERR_NO_ERROR)
     {
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index 41fac48..f22cb36 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -351,12 +351,8 @@ static void test_get_set(void)
  */
 
 #define lok                   ok_(__FILE__, line)
-#define lok_todo_4(todo_flag,a,b,c,d) \
-    if ((todo & todo_flag) == 0) lok((a), (b), (c), (d)); \
-    else todo_wine lok((a), (b), (c), (d));
-#define lok_todo_2(todo_flag,a,b) \
-    if ((todo & todo_flag) == 0) lok((a), (b)); \
-    else todo_wine lok((a), (b));
+#define lok_todo_4(todo_flag,a,b,c,d) todo_wine_if ((todo & todo_flag) != 0) lok((a), (b), (c), (d));
+#define lok_todo_2(todo_flag,a,b) todo_wine_if ((todo & todo_flag) != 0) lok((a), (b));
 #define check_lnk(a,b,c)        check_lnk_(__LINE__, (a), (b), (c))
 
 void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
@@ -433,16 +429,8 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
         lok(str == NULL, "got %p\n", str);
 
         r = IPersistFile_Save(pf, path, TRUE);
-        if (save_fails)
-        {
-            todo_wine {
-            lok(r == S_OK, "save failed (0x%08x)\n", r);
-            }
-        }
-        else
-        {
+        todo_wine_if (save_fails)
             lok(r == S_OK, "save failed (0x%08x)\n", r);
-        }
 
         /* test GetCurFile after ::Save */
         r = IPersistFile_GetCurFile(pf, &str);




More information about the wine-cvs mailing list