Nikolay Sivov : usp10/tests: Use todo_wine_if() in tests.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 17 11:15:03 CST 2016


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Feb 17 02:22:21 2016 +0300

usp10/tests: Use todo_wine_if() in tests.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/usp10/tests/usp10.c | 28 +++++++---------------------
 1 file changed, 7 insertions(+), 21 deletions(-)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 6fab064..7881667 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -85,38 +85,28 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
         winetest_win_skip("This test broken on this platform\n");
         return;
     }
-    if (nItemsToDo)
-        todo_wine winetest_ok(outnItems == nItems, "Wrong number of items\n");
-    else
+    todo_wine_if (nItemsToDo)
         winetest_ok(outnItems == nItems, "Wrong number of items\n");
     for (x = 0; x <= outnItems; x++)
     {
         if (items[x].isBroken && broken(outpItems[x].iCharPos == items[x].broken_value[0]))
             winetest_win_skip("This test broken on this platform\n");
-        else if (items[x].todo_flag[0])
-            todo_wine winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos\n",x);
-        else
+        else todo_wine_if (items[x].todo_flag[0])
             winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos (%i)\n",x,outpItems[x].iCharPos);
 
         if (items[x].isBroken && broken(outpItems[x].a.fRTL== items[x].broken_value[1]))
             winetest_win_skip("This test broken on this platform\n");
-        else if (items[x].todo_flag[1])
-            todo_wine winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL\n",x);
-        else
+        else todo_wine_if (items[x].todo_flag[1])
             winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL(%i)\n",x,outpItems[x].a.fRTL);
 
         if (items[x].isBroken && broken(outpItems[x].a.fLayoutRTL == items[x].broken_value[2]))
             winetest_win_skip("This test broken on this platform\n");
-        else if (items[x].todo_flag[2])
-            todo_wine winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL\n",x);
-        else
+        else todo_wine_if (items[x].todo_flag[2])
             winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL(%i)\n",x,outpItems[x].a.fLayoutRTL);
 
         if (items[x].isBroken && broken(outpItems[x].a.s.uBidiLevel == items[x].broken_value[3]))
             winetest_win_skip("This test broken on this platform\n");
-        else if (items[x].todo_flag[3])
-            todo_wine winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel\n",x);
-        else
+        else todo_wine_if (items[x].todo_flag[3])
             winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel(%i)\n",x,outpItems[x].a.s.uBidiLevel);
         if (x != outnItems)
             winetest_ok(outpItems[x].a.eScript != SCRIPT_UNDEFINED, "%i: Undefined script\n",x);
@@ -124,17 +114,13 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString,
         {
             if (items[x].isBroken && broken(tags[x] == items[x].broken_value[4]))
                 winetest_win_skip("This test broken on this platform\n");
-            else if (items[x].todo_flag[4])
-                todo_wine winetest_ok(tags[x] == items[x].scriptTag,"%i:Incorrect Script Tag %x != %x\n",x,tags[x],items[x].scriptTag);
-            else
+            else todo_wine_if (items[x].todo_flag[4])
                 winetest_ok(tags[x] == items[x].scriptTag,"%i:Incorrect Script Tag %x != %x\n",x,tags[x],items[x].scriptTag);
         }
 
         if (items[x].isBroken && broken(outpItems[x].a.s.fOverrideDirection == items[x].broken_value[5]))
             winetest_win_skip("This test broken on this platform\n");
-        else if (items[x].todo_flag[5])
-            todo_wine winetest_ok(outpItems[x].a.s.fOverrideDirection == items[x].fOverrideDirection, "%i:Wrong fOverrideDirection\n",x);
-        else
+        else todo_wine_if (items[x].todo_flag[5])
             winetest_ok(outpItems[x].a.s.fOverrideDirection == items[x].fOverrideDirection, "%i:Wrong fOverrideDirection(%i)\n",x,outpItems[x].a.s.fOverrideDirection);
     }
 }




More information about the wine-cvs mailing list