reactos/rostests/apitests/gdi32api/tests/CreateFont.c
Timo Kreuzer 58c6a293bc - make apitest.c into a static lib to be used by different tests
- add a gdi32 api test, based on the one in the win32 folder
- add a user32 api test
- change type of test functions to int
- implement a quick 'n dirty html api status output
- uncomment NtGdiTransormPoints in w32kdll.def
- add ASSERT1 macro (ASSERT is already used)
- include some more headers

svn path=/trunk/; revision=28169
2007-08-05 03:32:24 +00:00

25 lines
649 B
C

#include "..\gdi32api.h"
#define INVALIDFONT "ThisFontDoesNotExist"
INT
Test_CreateFont(PTESTINFO pti)
{
HFONT hFont;
LOGFONTA logfonta;
/* Test invalid font name */
hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH, INVALIDFONT);
TEST(hFont);
TEST(GetObjectA(hFont, sizeof(LOGFONTA), &logfonta) == sizeof(LOGFONTA));
TEST(memcmp(logfonta.lfFaceName, INVALIDFONT, strlen(INVALIDFONT)) == 0);
TEST(logfonta.lfWeight == FW_DONTCARE);
return APISTATUS_NORMAL;
}