Commit a1ff2c44 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus/tests: Add parameter validation test for GdipGetFontCollectionFamilyCount().

parent 481ee636
...@@ -1238,6 +1238,27 @@ static void test_GdipGetFontCollectionFamilyList(void) ...@@ -1238,6 +1238,27 @@ static void test_GdipGetFontCollectionFamilyList(void)
GdipDeleteFontFamily(family2); GdipDeleteFontFamily(family2);
} }
static void test_GdipGetFontCollectionFamilyCount(void)
{
GpFontCollection *collection;
GpStatus status;
INT count;
status = GdipGetFontCollectionFamilyCount(NULL, NULL);
ok(status == InvalidParameter, "Unexpected status %d.\n", status);
count = 123;
status = GdipGetFontCollectionFamilyCount(NULL, &count);
ok(status == InvalidParameter, "Unexpected status %d.\n", status);
ok(count == 123, "Unexpected family count %d.\n", count);
status = GdipNewInstalledFontCollection(&collection);
ok(status == Ok, "Failed to get system collection, status %d.\n", status);
status = GdipGetFontCollectionFamilyCount(collection, NULL);
ok(status == InvalidParameter, "Unexpected status %d.\n", status);
}
START_TEST(font) START_TEST(font)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
...@@ -1269,6 +1290,7 @@ START_TEST(font) ...@@ -1269,6 +1290,7 @@ START_TEST(font)
test_installedfonts(); test_installedfonts();
test_heightgivendpi(); test_heightgivendpi();
test_GdipGetFontCollectionFamilyList(); test_GdipGetFontCollectionFamilyList();
test_GdipGetFontCollectionFamilyCount();
GdiplusShutdown(gdiplusToken); GdiplusShutdown(gdiplusToken);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment