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

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


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Fri Feb 19 15:05:53 2016 +0100

msi/tests: Use todo_wine_if() in tests.

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

---

 dlls/msi/tests/automation.c |  9 ++-------
 dlls/msi/tests/package.c    | 19 ++++---------------
 2 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index d02e9a2..e4d2faa 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -601,10 +601,7 @@ static void test_dispid(void)
     while (ptr->name)
     {
         dispid = get_dispid(pInstaller, ptr->name);
-        if (ptr->todo)
-        todo_wine
-            ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid);
-        else
+        todo_wine_if (ptr->todo)
             ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid);
         ptr++;
     }
@@ -885,9 +882,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA
 
     if (hr == S_OK)
     {
-        if (_invoke_todo_vtResult) todo_wine
-            ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult);
-        else
+        todo_wine_if (_invoke_todo_vtResult)
             ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult);
         if (vtResult != VT_EMPTY)
         {
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 41f0f9f..60a08ac 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -2638,19 +2638,14 @@ static void test_feature_states( UINT line, MSIHANDLE package, const char *featu
     {
         ok( state == expected_state, "%u: expected state %d got %d\n",
             line, expected_state, state );
-        if (todo) todo_wine
-            ok( action == expected_action, "%u: expected action %d got %d\n",
-                line, expected_action, action );
-        else
+        todo_wine_if (todo)
             ok( action == expected_action, "%u: expected action %d got %d\n",
                 line, expected_action, action );
     }
     else
     {
         ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n", line, state );
-        if (todo) todo_wine
-            ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n", line, action );
-        else
+        todo_wine_if (todo)
             ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n", line, action );
 
     }
@@ -2669,10 +2664,7 @@ static void test_component_states( UINT line, MSIHANDLE package, const char *com
     {
         ok( state == expected_state, "%u: expected state %d got %d\n",
             line, expected_state, state );
-        if (todo) todo_wine
-            ok( action == expected_action, "%u: expected action %d got %d\n",
-                line, expected_action, action );
-        else
+        todo_wine_if (todo)
             ok( action == expected_action, "%u: expected action %d got %d\n",
                 line, expected_action, action );
     }
@@ -2680,10 +2672,7 @@ static void test_component_states( UINT line, MSIHANDLE package, const char *com
     {
         ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n",
             line, state );
-        if (todo) todo_wine
-            ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
-                line, action );
-        else
+        todo_wine_if (todo)
             ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
                 line, action );
     }




More information about the wine-cvs mailing list