Dmitry Timoshkov : gdi32: Remove broken check for WinXP.

Alexandre Julliard julliard at winehq.org
Wed Nov 10 11:09:41 CST 2010


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Nov 10 20:38:55 2010 +0800

gdi32: Remove broken check for WinXP.

---

 dlls/gdi32/tests/font.c |   99 ++++++++++++++++++++++-------------------------
 1 files changed, 46 insertions(+), 53 deletions(-)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index cede3aa..b200ca1 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -3185,8 +3185,6 @@ static void test_AddFontMemResource(void)
     void *font;
     DWORD font_size, num_fonts;
     HANDLE ret;
-    DEVMODEA dmA;
-    BOOL is_winxp;
 
     if (!pAddFontMemResourceEx || !pRemoveFontMemResourceEx)
     {
@@ -3201,62 +3199,59 @@ static void test_AddFontMemResource(void)
         return;
     }
 
-    is_winxp = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dmA) &&
-               (dmA.dmFields & DM_DISPLAYORIENTATION);
-
-    if (is_winxp)
-    {
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(NULL, 0, NULL, NULL);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(NULL, 0, NULL, NULL);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(NULL, 10, NULL, NULL);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(NULL, 10, NULL, NULL);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(NULL, 0, NULL, &num_fonts);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(NULL, 0, NULL, &num_fonts);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(NULL, 10, NULL, &num_fonts);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(NULL, 10, NULL, &num_fonts);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(font, 0, NULL, NULL);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(font, 0, NULL, NULL);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(font, 10, NULL, NULL);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(font, 10, NULL, NULL);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
 
-        num_fonts = 0xdeadbeef;
-        SetLastError(0xdeadbeef);
-        ret = pAddFontMemResourceEx(font, 0, NULL, &num_fonts);
-        ok(!ret, "AddFontMemResourceEx should fail\n");
-        ok(GetLastError() == ERROR_INVALID_PARAMETER,
-           "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
-           GetLastError());
-        ok(num_fonts == 0xdeadbeef, "number of loaded fonts should be 0xdeadbeef\n");
+    num_fonts = 0xdeadbeef;
+    SetLastError(0xdeadbeef);
+    ret = pAddFontMemResourceEx(font, 0, NULL, &num_fonts);
+    ok(!ret, "AddFontMemResourceEx should fail\n");
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
+       "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
+       GetLastError());
+    ok(num_fonts == 0xdeadbeef, "number of loaded fonts should be 0xdeadbeef\n");
 
+    if (0) /* hangs under windows 2000 */
+    {
         num_fonts = 0xdeadbeef;
         SetLastError(0xdeadbeef);
         ret = pAddFontMemResourceEx(font, 10, NULL, &num_fonts);
@@ -3266,8 +3261,6 @@ static void test_AddFontMemResource(void)
            GetLastError());
         ok(num_fonts == 0xdeadbeef, "number of loaded fonts should be 0xdeadbeef\n");
     }
-    else
-        win_skip("AddFontMemResourceEx invalid parameter tests are problematic on Win2k\n");
 
     num_fonts = 0xdeadbeef;
     SetLastError(0xdeadbeef);




More information about the wine-cvs mailing list