oleaut32/tests: Use BOOL type where appropriate.
This commit is contained in:
parent
f4dc64918e
commit
3f91834ffb
|
@ -77,9 +77,9 @@ static void test_ifont_size(LONG lo_size, LONG hi_size,
|
|||
S(fd.cySize).Hi = hi_size;
|
||||
fd.sWeight = 0;
|
||||
fd.sCharset = 0;
|
||||
fd.fItalic = 0;
|
||||
fd.fUnderline = 0;
|
||||
fd.fStrikethrough = 0;
|
||||
fd.fItalic = FALSE;
|
||||
fd.fUnderline = FALSE;
|
||||
fd.fStrikethrough = FALSE;
|
||||
|
||||
/* Create font, test that it worked. */
|
||||
hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj);
|
||||
|
@ -539,9 +539,9 @@ static void test_IsEqual(void)
|
|||
S(fd.cySize).Hi = 100;
|
||||
fd.sWeight = 0;
|
||||
fd.sCharset = 0;
|
||||
fd.fItalic = 0;
|
||||
fd.fUnderline = 0;
|
||||
fd.fStrikethrough = 0;
|
||||
fd.fItalic = FALSE;
|
||||
fd.fUnderline = FALSE;
|
||||
fd.fStrikethrough = FALSE;
|
||||
|
||||
/* Create font */
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt);
|
||||
|
@ -604,30 +604,30 @@ static void test_IsEqual(void)
|
|||
IFont_Release(ifnt2);
|
||||
|
||||
/* Test italic setting */
|
||||
fd.fItalic = 1;
|
||||
fd.fItalic = TRUE;
|
||||
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);
|
||||
fd.fItalic = 0;
|
||||
fd.fItalic = FALSE;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
/* Test underline setting */
|
||||
fd.fUnderline = 1;
|
||||
fd.fUnderline = TRUE;
|
||||
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);
|
||||
fd.fUnderline = 0;
|
||||
fd.fUnderline = FALSE;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
/* Test strikethrough setting */
|
||||
fd.fStrikethrough = 1;
|
||||
fd.fStrikethrough = TRUE;
|
||||
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);
|
||||
fd.fStrikethrough = 0;
|
||||
fd.fStrikethrough = FALSE;
|
||||
IFont_Release(ifnt2);
|
||||
|
||||
/* Free IFont. */
|
||||
|
@ -652,9 +652,9 @@ static void test_ReleaseHfont(void)
|
|||
S(fd.cySize).Hi = 100;
|
||||
fd.sWeight = 0;
|
||||
fd.sCharset = 0;
|
||||
fd.fItalic = 0;
|
||||
fd.fUnderline = 0;
|
||||
fd.fStrikethrough = 0;
|
||||
fd.fItalic = FALSE;
|
||||
fd.fUnderline = FALSE;
|
||||
fd.fStrikethrough = FALSE;
|
||||
|
||||
/* Create HFONTs and IFONTs */
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj1);
|
||||
|
@ -722,9 +722,9 @@ static void test_AddRefHfont(void)
|
|||
S(fd.cySize).Hi = 100;
|
||||
fd.sWeight = 0;
|
||||
fd.sCharset = 0;
|
||||
fd.fItalic = 0;
|
||||
fd.fUnderline = 0;
|
||||
fd.fStrikethrough = 0;
|
||||
fd.fItalic = FALSE;
|
||||
fd.fUnderline = FALSE;
|
||||
fd.fStrikethrough = FALSE;
|
||||
|
||||
/* Create HFONTs and IFONTs */
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt1);
|
||||
|
@ -813,7 +813,7 @@ static void test_AddRefHfont(void)
|
|||
IFont_Release(ifnt2);
|
||||
|
||||
/* Need to make a new IFONT for testing */
|
||||
fd.fUnderline = 1;
|
||||
fd.fUnderline = TRUE;
|
||||
pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt3);
|
||||
IFont_get_hFont(ifnt3,&hfnt3);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0
|
|||
static WCHAR wszGUID[] = {'G','U','I','D',0};
|
||||
static WCHAR wszguid[] = {'g','u','i','d',0};
|
||||
|
||||
static const int is_win64 = sizeof(void *) > sizeof(int);
|
||||
static const BOOL is_win64 = sizeof(void *) > sizeof(int);
|
||||
|
||||
static HRESULT WINAPI invoketest_QueryInterface(IInvokeTest *iface, REFIID riid, void **ret)
|
||||
{
|
||||
|
|
|
@ -381,9 +381,9 @@ static const VARTYPE ExtraFlags[16] =
|
|||
};
|
||||
|
||||
/* Determine if a vt is valid for VariantClear() */
|
||||
static int IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags)
|
||||
static BOOL IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags)
|
||||
{
|
||||
int ret = 0;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
/* Only the following flags/types are valid */
|
||||
if ((vt <= VT_LPWSTR || vt == VT_RECORD || vt == VT_CLSID) &&
|
||||
|
@ -392,10 +392,10 @@ static int IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags)
|
|||
(!(extraFlags & (VT_BYREF|VT_ARRAY)) || vt > VT_NULL) &&
|
||||
(extraFlags == 0 || extraFlags == VT_BYREF || extraFlags == VT_ARRAY ||
|
||||
extraFlags == (VT_ARRAY|VT_BYREF)))
|
||||
ret = 1; /* ok */
|
||||
ret = TRUE; /* ok */
|
||||
|
||||
if (!has_i8 && (vt == VT_I8 || vt == VT_UI8))
|
||||
ret = 0; /* Old versions of oleaut32 */
|
||||
ret = FALSE; /* Old versions of oleaut32 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -681,15 +681,15 @@ static void test_VariantCopy(void)
|
|||
}
|
||||
|
||||
/* Determine if a vt is valid for VariantCopyInd() */
|
||||
static int IsValidVariantCopyIndVT(VARTYPE vt, VARTYPE extraFlags)
|
||||
static BOOL IsValidVariantCopyIndVT(VARTYPE vt, VARTYPE extraFlags)
|
||||
{
|
||||
int ret = 0;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if ((extraFlags & VT_ARRAY) ||
|
||||
(vt > VT_NULL && vt != (VARTYPE)15 && vt < VT_VOID &&
|
||||
!(extraFlags & (VT_VECTOR|VT_RESERVED))))
|
||||
{
|
||||
ret = 1; /* ok */
|
||||
ret = TRUE; /* ok */
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -2875,7 +2875,7 @@ static void test_VarFix(void)
|
|||
|
||||
for (vt = 0; vt <= VT_BSTR_BLOB; vt++)
|
||||
{
|
||||
HRESULT bFail = TRUE;
|
||||
BOOL bFail = TRUE;
|
||||
|
||||
SKIPTESTS(vt);
|
||||
|
||||
|
@ -2990,7 +2990,7 @@ static void test_VarInt(void)
|
|||
|
||||
for (vt = 0; vt <= VT_BSTR_BLOB; vt++)
|
||||
{
|
||||
HRESULT bFail = TRUE;
|
||||
BOOL bFail = TRUE;
|
||||
|
||||
SKIPTESTS(vt);
|
||||
|
||||
|
@ -3111,7 +3111,7 @@ static void test_VarNeg(void)
|
|||
|
||||
for (vt = 0; vt <= VT_BSTR_BLOB; vt++)
|
||||
{
|
||||
HRESULT bFail = TRUE;
|
||||
BOOL bFail = TRUE;
|
||||
|
||||
SKIPTESTS(vt);
|
||||
|
||||
|
|
Loading…
Reference in New Issue