olefont GetTypeInfo test (with patch)
Walt Ogburn
reuben at ugcs.caltech.edu
Mon Sep 12 23:48:02 CDT 2005
This time the patch is included!
Changelog:
Test that GetTypeInfo on IFontDisp can be used to get the members of
IFontDisp from stdole2.tlb.
--
Test passes once previous patch is applied.
-------------- next part --------------
Index: dlls/oleaut32/tests/olefont.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tests/olefont.c,v
retrieving revision 1.7
diff -u -p -r1.7 olefont.c
--- dlls/oleaut32/tests/olefont.c 22 Aug 2005 09:22:52 -0000 1.7
+++ dlls/oleaut32/tests/olefont.c 13 Sep 2005 02:48:00 -0000
@@ -131,6 +131,34 @@ void test_QueryInterface(void)
IFont_Release(font);
}
+void test_type_info(void)
+{
+ LPVOID pvObj = NULL;
+ HRESULT hres;
+ IFontDisp* fontdisp = NULL;
+ ITypeInfo* pTInfo;
+ WCHAR name_Name[] = {'N','a','m','e',0};
+ BSTR names[3];
+ UINT n;
+ LCID en_us = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),
+ SORT_DEFAULT);
+
+ pOleCreateFontIndirect(NULL, &IID_IFontDisp, &pvObj);
+ fontdisp = pvObj;
+
+ hres = (fontdisp)->lpVtbl->GetTypeInfo(fontdisp, 0, en_us, &pTInfo);
+ ok(hres == S_OK, "GTI returned 0x%08lx instead of S_OK.\n", hres);
+ ok(pTInfo != NULL, "GTI returned NULL.\n");
+
+ hres = (pTInfo)->lpVtbl->GetNames(pTInfo, DISPID_FONT_NAME, names, 3, &n);
+ ok(hres == S_OK, "GetNames returned 0x%08lx instead of S_OK.\n", hres);
+ ok(n == 1, "GetNames returned %d names instead of 1.\n", n);
+ ok(!lstrcmpiW(names[0],name_Name), "DISPID_FONT_NAME doesn't get 'Names'.\n");
+
+ (pTInfo)->lpVtbl->Release(pTInfo);
+ (fontdisp)->lpVtbl->Release(fontdisp);
+}
+
START_TEST(olefont)
{
hOleaut32 = LoadLibraryA("oleaut32.dll");
@@ -139,6 +167,7 @@ START_TEST(olefont)
return;
test_QueryInterface();
+ test_type_info();
/* Test various size operations and conversions. */
/* Add more as needed. */
More information about the wine-patches
mailing list