2007-08-05 03:32:24 +00:00
|
|
|
#define INVALIDFONT "ThisFontDoesNotExist"
|
|
|
|
|
|
|
|
INT
|
|
|
|
Test_CreateFont(PTESTINFO pti)
|
|
|
|
{
|
|
|
|
HFONT hFont;
|
|
|
|
LOGFONTA logfonta;
|
|
|
|
|
|
|
|
/* Test invalid font name */
|
2007-10-19 23:01:40 +00:00
|
|
|
hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,
|
|
|
|
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
|
2007-08-05 03:32:24 +00:00
|
|
|
DEFAULT_QUALITY, DEFAULT_PITCH, INVALIDFONT);
|
2007-08-05 23:05:02 +00:00
|
|
|
RTEST(hFont);
|
|
|
|
RTEST(GetObjectA(hFont, sizeof(LOGFONTA), &logfonta) == sizeof(LOGFONTA));
|
|
|
|
RTEST(memcmp(logfonta.lfFaceName, INVALIDFONT, strlen(INVALIDFONT)) == 0);
|
|
|
|
RTEST(logfonta.lfWeight == FW_DONTCARE);
|
2007-08-05 03:32:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|