gdiplus: skip some tests if Arial is not installed

Austin English austinenglish at gmail.com
Sat Mar 22 17:43:58 CDT 2014


https://testbot.winehq.org/JobDetails.pl?Key=5866

-- 
-Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140322/42788bb3/attachment.html>
-------------- next part --------------
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 2b5cf09..30eadde 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -30,6 +30,7 @@
 #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got))
 #define expectf(expected, got) expectf_((expected), (got), 0.001)
 
+static const WCHAR Arial[] = {'A','r','i','a','l',0};
 static const WCHAR nonexistent[] = {'T','h','i','s','F','o','n','t','s','h','o','u','l','d','N','o','t','E','x','i','s','t','\0'};
 static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
 static const WCHAR MicrosoftSansSerif[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
@@ -775,6 +776,13 @@ static void test_font_substitution(void)
     status = GdipCreateFontFamilyFromName(nonexistent, NULL, &family);
     ok(status == FontFamilyNotFound, "expected FontFamilyNotFound, got %d\n", status);
 
+    status = GdipCreateFontFamilyFromName(Arial, NULL, &family);
+    if (status == FontFamilyNotFound)
+    {
+        skip("Arial not installed\n");
+        return;
+    }
+
     lstrcpyA(lf.lfFaceName, "ThisFontShouldNotExist");
     status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
     expect(Ok, status);


More information about the wine-patches mailing list