oleaut32: Remove LPVOID variables in olefont tests and pass IFont pointers into OleCreateFontIndirect directly.
In many places the assignment of the LPVOID variable into the corresponding IFont * variable has been forgotten.
This commit is contained in:
parent
58c7aa4691
commit
f7624cbfbc
|
@ -491,8 +491,6 @@ static void test_Invoke(void)
|
|||
static void test_IsEqual(void)
|
||||
{
|
||||
FONTDESC fd;
|
||||
LPVOID pvObj = NULL;
|
||||
LPVOID pvObj2 = NULL;
|
||||
IFont* ifnt = NULL;
|
||||
IFont* ifnt2 = NULL;
|
||||
HRESULT hres;
|
||||
|
@ -509,12 +507,10 @@ static void test_IsEqual(void)
|
|||
fd.fStrikethrough = 0;
|
||||
|
||||
/* Create font */
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj);
|
||||
ifnt = pvObj;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt);
|
||||
|
||||
/* Test equal fonts */
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
ifnt2 = pvObj2;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_OK,
|
||||
"IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08x\n",hres);
|
||||
|
@ -527,7 +523,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test strName */
|
||||
fd.lpstrName = arial_font;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -536,8 +532,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test lo font size */
|
||||
S(fd.cySize).Lo = 10000;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
ifnt2 = pvObj2;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -546,8 +541,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test hi font size */
|
||||
S(fd.cySize).Hi = 10000;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
ifnt2 = pvObj2;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -556,8 +550,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test font weight */
|
||||
fd.sWeight = 100;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
ifnt2 = pvObj2;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -566,7 +559,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test charset */
|
||||
fd.sCharset = 1;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -575,7 +568,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test italic setting */
|
||||
fd.fItalic = 1;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -584,7 +577,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test underline setting */
|
||||
fd.fUnderline = 1;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
@ -593,7 +586,7 @@ static void test_IsEqual(void)
|
|||
|
||||
/* Test strikethrough setting */
|
||||
fd.fStrikethrough = 1;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2);
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2);
|
||||
hres = IFont_IsEqual(ifnt,ifnt2);
|
||||
ok(hres == S_FALSE,
|
||||
"IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres);
|
||||
|
|
Loading…
Reference in New Issue