Adam Petaccia : gdiplus: Skip the generic font tests if we don' t have the required fonts.
Alexandre Julliard
julliard at winehq.org
Tue Aug 5 07:26:44 CDT 2008
Module: wine
Branch: master
Commit: e4cc0bc4229dff8374b1f7117eb2685bd265c4a9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e4cc0bc4229dff8374b1f7117eb2685bd265c4a9
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Mon Aug 4 14:55:06 2008 -0400
gdiplus: Skip the generic font tests if we don't have the required fonts.
---
dlls/gdiplus/tests/font.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 8ce0ec6..3d30a86 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -108,6 +108,11 @@ todo_wine {
memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR));
stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
+ if (stat == FileNotFound)
+ {
+ skip("Arial not installed.\n");
+ return;
+ }
expect(Ok, stat);
stat = GdipGetLogFontW(font, graphics, &lfw2);
expect(Ok, stat);
@@ -282,6 +287,11 @@ static void test_getgenerics (void)
ZeroMemory(familyName, sizeof(familyName)/sizeof(WCHAR));
stat = GdipGetGenericFontFamilySansSerif (&family);
+ if (stat == FontFamilyNotFound)
+ {
+ skip("Microsoft Sans Serif not installed\n");
+ goto serif;
+ }
expect (Ok, stat);
stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL);
expect (Ok, stat);
@@ -292,7 +302,13 @@ static void test_getgenerics (void)
stat = GdipDeleteFontFamily (family);
expect (Ok, stat);
+serif:
stat = GdipGetGenericFontFamilySerif (&family);
+ if (stat == FontFamilyNotFound)
+ {
+ skip("Times New Roman not installed\n");
+ goto monospace;
+ }
expect (Ok, stat);
stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL);
expect (Ok, stat);
@@ -301,7 +317,13 @@ static void test_getgenerics (void)
stat = GdipDeleteFontFamily (family);
expect (Ok, stat);
+monospace:
stat = GdipGetGenericFontFamilyMonospace (&family);
+ if (stat == FontFamilyNotFound)
+ {
+ skip("Courier New not installed\n");
+ return;
+ }
expect (Ok, stat);
stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL);
expect (Ok, stat);
More information about the wine-cvs
mailing list