Vincent Povirk : gdiplus: Add test for GdipNewInstalledFontCollection.

Alexandre Julliard julliard at winehq.org
Tue Apr 28 07:53:00 CDT 2009


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Wed Jan 28 16:08:43 2009 -0600

gdiplus: Add test for GdipNewInstalledFontCollection.

---

 dlls/gdiplus/tests/font.c |   14 ++++++++++++++
 include/gdiplusflat.h     |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 7d6582f..6fbb8e2 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -340,6 +340,19 @@ monospace:
     expect (Ok, stat);
 }
 
+static void test_installedfonts (void)
+{
+    GpStatus stat;
+    GpFontCollection* collection=NULL;
+
+    stat = GdipNewInstalledFontCollection(NULL);
+    expect (InvalidParameter, stat);
+
+    stat = GdipNewInstalledFontCollection(&collection);
+    todo_wine expect (Ok, stat);
+    todo_wine ok (collection != NULL, "got NULL font collection\n");
+}
+
 START_TEST(font)
 {
     struct GdiplusStartupInput gdiplusStartupInput;
@@ -357,6 +370,7 @@ START_TEST(font)
     test_fontfamily();
     test_fontfamily_properties();
     test_getgenerics();
+    test_installedfonts();
 
     GdiplusShutdown(gdiplusToken);
 }
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 158eb5e..f8ebc73 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -93,6 +93,7 @@ GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*, GDIPCONST GpGraphics*,
 GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*);
 
 /* FontCollection */
+GpStatus WINGDIPAPI GdipNewInstalledFontCollection(GpFontCollection**);
 GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**);
 GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**);
 GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection*, GDIPCONST WCHAR*);




More information about the wine-cvs mailing list