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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2018-11-01 12:53:27 +03:00 committed by Alexandre Julliard
parent 481ee636c1
commit a1ff2c44ea
1 changed files with 22 additions and 0 deletions

View File

@ -1238,6 +1238,27 @@ static void test_GdipGetFontCollectionFamilyList(void)
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)
{
struct GdiplusStartupInput gdiplusStartupInput;
@ -1269,6 +1290,7 @@ START_TEST(font)
test_installedfonts();
test_heightgivendpi();
test_GdipGetFontCollectionFamilyList();
test_GdipGetFontCollectionFamilyCount();
GdiplusShutdown(gdiplusToken);
}