Nikolay Sivov : dwrite: Added one more test for system font collection.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 16 09:44:21 CDT 2014
Module: wine
Branch: master
Commit: 8f34bee25ac54f13538e5a6bf172c8b73dd58d1e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f34bee25ac54f13538e5a6bf172c8b73dd58d1e
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Oct 16 07:29:31 2014 +0400
dwrite: Added one more test for system font collection.
---
dlls/dwrite/tests/font.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c
index 65cd398..33c47bd 100644
--- a/dlls/dwrite/tests/font.c
+++ b/dlls/dwrite/tests/font.c
@@ -657,11 +657,13 @@ if (0) /* crashes on native */
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface);
/* the fontface refcount is increased here */
-
IDWriteFontFace_Release(fontface);
+ IDWriteFont_Release(font);
+
+ hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFont, (void**)&font);
+ ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL), "got 0x%08x\n", hr);
IDWriteFontFace_Release(fontface);
- IDWriteFont_Release(font);
IDWriteGdiInterop_Release(interop);
}
@@ -726,6 +728,7 @@ static void test_system_fontcollection(void)
{
IDWriteFontCollection *collection, *coll2;
IDWriteFontFamily *family;
+ IDWriteFactory *factory2;
HRESULT hr;
UINT32 i;
BOOL ret;
@@ -743,6 +746,14 @@ static void test_system_fontcollection(void)
ok(coll2 == collection, "got %p, was %p\n", coll2, collection);
IDWriteFontCollection_Release(coll2);
+ hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, &IID_IDWriteFactory, (IUnknown**)&factory2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ hr = IDWriteFactory_GetSystemFontCollection(factory2, &coll2, FALSE);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(coll2 != collection, "got %p, was %p\n", coll2, collection);
+ IDWriteFontCollection_Release(coll2);
+ IDWriteFactory_Release(factory2);
+
i = IDWriteFontCollection_GetFontFamilyCount(collection);
ok(i, "got %u\n", i);
More information about the wine-cvs
mailing list