comctl32/tests: Better deal with the unsupported CreateWindowExW() case.

Francois Gouget fgouget at free.fr
Sun Dec 1 09:24:40 CST 2013


No matter why CreateWindowExW() fails, if we don't have an hwnd we have 
to skip the tests.
---

 dlls/comctl32/tests/tooltips.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c
index d5f97b3..eefb4eb 100644
--- a/dlls/comctl32/tests/tooltips.c
+++ b/dlls/comctl32/tests/tooltips.c
@@ -403,9 +403,9 @@ static void test_gettext(void)
     hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0,
                            10, 10, 300, 100,
                            NULL, NULL, NULL, 0);
-
-    if (!hwnd && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
-        win_skip("CreateWindowExW is not implemented\n");
+    ok(hwnd || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "CreateWindowExW() failed, le=%u\n", GetLastError());
+    if(!hwnd) {
+        win_skip("Cannot use CreateWindowExW(). Skipping.\n");
         return;
     }
 
@@ -560,9 +560,10 @@ static void test_ttm_gettoolinfo(void)
     hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0,
                            10, 10, 300, 100,
                            NULL, NULL, NULL, 0);
+    ok(hwnd || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "CreateWindowExW() failed, le=%u\n", GetLastError());
     if(!hwnd)
     {
-        win_skip("CreateWindowExW() not supported. Skipping.\n");
+        win_skip("Cannot use CreateWindowExW(). Skipping.\n");
         return;
     }
 
@@ -706,9 +707,10 @@ static void test_longtextW(void)
     hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0,
                            10, 10, 300, 100,
                            NULL, NULL, NULL, 0);
+    ok(hwnd || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "CreateWindowExW() failed, le=%u\n", GetLastError());
     if(!hwnd)
     {
-        win_skip("CreateWindowExW() not supported. Skipping.\n");
+        win_skip("Cannot use CreateWindowExW(). Skipping.\n");
         return;
     }
 
-- 
1.8.4.3




More information about the wine-patches mailing list