Paul Vriens : gdiplus/tests: Fix test failures on Win98 by using A-functions.
Alexandre Julliard
julliard at winehq.org
Fri Apr 24 10:00:09 CDT 2009
Module: wine
Branch: master
Commit: 163b046ec57167ddc0cde0f0626da18d487eb39d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=163b046ec57167ddc0cde0f0626da18d487eb39d
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Thu Apr 23 21:29:22 2009 +0200
gdiplus/tests: Fix test failures on Win98 by using A-functions.
---
dlls/gdiplus/tests/font.c | 87 ++++++++++++++++++++++-----------------------
1 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 125535d..7d6582f 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -97,7 +97,7 @@ static void test_createfont(void)
static void test_logfont(void)
{
- LOGFONTW lfw, lfw2;
+ LOGFONTA lfa, lfa2;
GpFont *font;
GpStatus stat;
GpGraphics *graphics;
@@ -105,70 +105,69 @@ static void test_logfont(void)
INT style;
GdipCreateFromHDC(hdc, &graphics);
- memset(&lfw, 0, sizeof(LOGFONTW));
- memset(&lfw2, 0xff, sizeof(LOGFONTW));
+ memset(&lfa, 0, sizeof(LOGFONTA));
+ memset(&lfa2, 0xff, sizeof(LOGFONTA));
/* empty FaceName */
- lfw.lfFaceName[0] = 0;
- stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
-
+ lfa.lfFaceName[0] = 0;
+ stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
expect(NotTrueTypeFont, stat);
- memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR));
+ lstrcpyA(lfa.lfFaceName, "Arial");
- stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
+ stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
if (stat == FileNotFound)
{
skip("Arial not installed.\n");
return;
}
expect(Ok, stat);
- stat = GdipGetLogFontW(font, graphics, &lfw2);
+ stat = GdipGetLogFontA(font, graphics, &lfa2);
expect(Ok, stat);
- ok(lfw2.lfHeight < 0, "Expected negative height\n");
- expect(0, lfw2.lfWidth);
- expect(0, lfw2.lfEscapement);
- expect(0, lfw2.lfOrientation);
- ok((lfw2.lfWeight >= 100) && (lfw2.lfWeight <= 900), "Expected weight to be set\n");
- expect(0, lfw2.lfItalic);
- expect(0, lfw2.lfUnderline);
- expect(0, lfw2.lfStrikeOut);
- expect(GetTextCharset(hdc), lfw2.lfCharSet);
- expect(0, lfw2.lfOutPrecision);
- expect(0, lfw2.lfClipPrecision);
- expect(0, lfw2.lfQuality);
- expect(0, lfw2.lfPitchAndFamily);
+ ok(lfa2.lfHeight < 0, "Expected negative height\n");
+ expect(0, lfa2.lfWidth);
+ expect(0, lfa2.lfEscapement);
+ expect(0, lfa2.lfOrientation);
+ ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n");
+ expect(0, lfa2.lfItalic);
+ expect(0, lfa2.lfUnderline);
+ expect(0, lfa2.lfStrikeOut);
+ expect(GetTextCharset(hdc), lfa2.lfCharSet);
+ expect(0, lfa2.lfOutPrecision);
+ expect(0, lfa2.lfClipPrecision);
+ expect(0, lfa2.lfQuality);
+ expect(0, lfa2.lfPitchAndFamily);
GdipDeleteFont(font);
- memset(&lfw, 0, sizeof(LOGFONTW));
- lfw.lfHeight = 25;
- lfw.lfWidth = 25;
- lfw.lfEscapement = lfw.lfOrientation = 50;
- lfw.lfItalic = lfw.lfUnderline = lfw.lfStrikeOut = TRUE;
+ memset(&lfa, 0, sizeof(LOGFONTA));
+ lfa.lfHeight = 25;
+ lfa.lfWidth = 25;
+ lfa.lfEscapement = lfa.lfOrientation = 50;
+ lfa.lfItalic = lfa.lfUnderline = lfa.lfStrikeOut = TRUE;
- memset(&lfw2, 0xff, sizeof(LOGFONTW));
- memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR));
+ memset(&lfa2, 0xff, sizeof(LOGFONTA));
+ lstrcpyA(lfa.lfFaceName, "Arial");
- stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
+ stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
expect(Ok, stat);
- stat = GdipGetLogFontW(font, graphics, &lfw2);
+ stat = GdipGetLogFontA(font, graphics, &lfa2);
expect(Ok, stat);
- ok(lfw2.lfHeight < 0, "Expected negative height\n");
- expect(0, lfw2.lfWidth);
- expect(0, lfw2.lfEscapement);
- expect(0, lfw2.lfOrientation);
- ok((lfw2.lfWeight >= 100) && (lfw2.lfWeight <= 900), "Expected weight to be set\n");
- expect(TRUE, lfw2.lfItalic);
- expect(TRUE, lfw2.lfUnderline);
- expect(TRUE, lfw2.lfStrikeOut);
- expect(GetTextCharset(hdc), lfw2.lfCharSet);
- expect(0, lfw2.lfOutPrecision);
- expect(0, lfw2.lfClipPrecision);
- expect(0, lfw2.lfQuality);
- expect(0, lfw2.lfPitchAndFamily);
+ ok(lfa2.lfHeight < 0, "Expected negative height\n");
+ expect(0, lfa2.lfWidth);
+ expect(0, lfa2.lfEscapement);
+ expect(0, lfa2.lfOrientation);
+ ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n");
+ expect(TRUE, lfa2.lfItalic);
+ expect(TRUE, lfa2.lfUnderline);
+ expect(TRUE, lfa2.lfStrikeOut);
+ expect(GetTextCharset(hdc), lfa2.lfCharSet);
+ expect(0, lfa2.lfOutPrecision);
+ expect(0, lfa2.lfClipPrecision);
+ expect(0, lfa2.lfQuality);
+ expect(0, lfa2.lfPitchAndFamily);
stat = GdipGetFontStyle(font, &style);
expect(Ok, stat);
More information about the wine-cvs
mailing list