ReactOS  0.4.14-dev-323-g6fe6a88
CreateFont.c File Reference
#include "precomp.h"
Include dependency graph for CreateFont.c:

Go to the source code of this file.

Macros

#define INVALIDFONT   "ThisFontDoesNotExist"
 

Functions

void Test_CreateFontA ()
 
 START_TEST (CreateFont)
 

Macro Definition Documentation

◆ INVALIDFONT

#define INVALIDFONT   "ThisFontDoesNotExist"

Definition at line 10 of file CreateFont.c.

Function Documentation

◆ START_TEST()

START_TEST ( CreateFont  )

Definition at line 32 of file CreateFont.c.

33 {
35 }
void Test_CreateFontA()
Definition: CreateFont.c:12

◆ Test_CreateFontA()

void Test_CreateFontA ( )

Definition at line 12 of file CreateFont.c.

13 {
14  HFONT hFont;
15  LOGFONTA logfonta;
16  INT result;
17 
18  /* Test invalid font name */
19  hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,
22  ok(hFont != 0, "CreateFontA failed\n");
23 
24  result = GetObjectA(hFont, sizeof(LOGFONTA), &logfonta);
25  ok(result == sizeof(LOGFONTA), "result = %d", result);
26 
27  ok(memcmp(logfonta.lfFaceName, INVALIDFONT, strlen(INVALIDFONT)) == 0, "not equal\n");
28  ok(logfonta.lfWeight == FW_DONTCARE, "lfWeight=%ld\n", logfonta.lfWeight);
29 
30 }
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define DEFAULT_QUALITY
Definition: wingdi.h:435
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define DEFAULT_CHARSET
Definition: wingdi.h:383
int32_t INT
Definition: typedefs.h:56
HFONT hFont
Definition: main.c:53
#define INVALIDFONT
Definition: CreateFont.c:10
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:425
LONG lfWeight
Definition: dimm.idl:46
#define DEFAULT_PITCH
Definition: wingdi.h:442
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:414
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
#define FW_DONTCARE
Definition: wingdi.h:367
#define ok(value,...)
Definition: atltest.h:57
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
GLuint64EXT * result
Definition: glext.h:11304

Referenced by START_TEST().