Adam Petaccia : gdiplus: Test for GdipGetFamily.

Alexandre Julliard julliard at winehq.org
Thu Aug 28 07:00:46 CDT 2008


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

Author: Adam Petaccia <adam at tpetaccia.com>
Date:   Wed Aug 27 17:21:45 2008 -0400

gdiplus: Test for GdipGetFamily.

---

 dlls/gdiplus/tests/font.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 3d30a86..3a009f4 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -41,12 +41,13 @@ static const char *debugstr_w(LPCWSTR str)
 
 static void test_createfont(void)
 {
-    GpFontFamily* fontfamily = NULL;
+    GpFontFamily* fontfamily = NULL, *fontfamily2;
     GpFont* font = NULL;
     GpStatus stat;
     Unit unit;
     UINT i;
     REAL size;
+    WCHAR familyname[LF_FACESIZE];
 
     stat = GdipCreateFontFamilyFromName(nonexistent, NULL, &fontfamily);
     expect (FontFamilyNotFound, stat);
@@ -65,6 +66,17 @@ static void test_createfont(void)
     expect (Ok, stat);
     expect (UnitPoint, unit);
 
+    stat = GdipGetFamily(font, &fontfamily2);
+todo_wine
+    expect(Ok, stat);
+    stat = GdipGetFamilyName(fontfamily2, familyname, 0);
+    expect(Ok, stat);
+todo_wine
+    ok (lstrcmpiW(arial, familyname) == 0, "Expected arial, got %s\n",
+            debugstr_w(familyname));
+    stat = GdipDeleteFontFamily(fontfamily2);
+    expect(Ok, stat);
+
     /* Test to see if returned size is based on unit (its not) */
     GdipGetFontSize(font, &size);
     ok (size == 12, "Expected 12, got %f\n", size);




More information about the wine-cvs mailing list