gdi32/tests: use ret in test_CreateFontIndirect() (try 2)

Austin English austinenglish at gmail.com
Sat May 22 03:35:07 CDT 2010


Changes from try 1:
Set LastError first, and print GetLastError as a decimal.

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 72cf9be..6ef98c8 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -3095,7 +3095,9 @@ static void test_CreateFontIndirect(void)
         lstrcpyA(lf.lfFaceName, TestName[i]);
         hfont = CreateFontIndirectA(&lf);
         ok(hfont != 0, "CreateFontIndirectA failed\n");
+        SetLastError(0xdeadbeef);
         ret = GetObject(hfont, sizeof(getobj_lf), &getobj_lf);
+        ok(ret, "GetObject failed: %d\n", GetLastError());
         ok(lf.lfItalic == getobj_lf.lfItalic, "lfItalic: expect %02x got %02x\n", lf.lfItalic, getobj_lf.lfItalic);
         ok(lf.lfWeight == getobj_lf.lfWeight ||
            broken((SHORT)lf.lfWeight == getobj_lf.lfWeight), /* win9x */


More information about the wine-patches mailing list