Commit 6ede7a11 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32/tests: Create a window for justification tests that generate output

instead of painting over the desktop.
parent 795b4018
......@@ -998,10 +998,11 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
static void test_SetTextJustification(void)
{
HDC hdc = GetDC(0);
RECT clientArea = {0, 0, 400, 400};
HDC hdc;
RECT clientArea;
LOGFONTA lf;
HFONT hfont;
HWND hwnd;
static char testText[] =
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do "
"eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut "
......@@ -1011,6 +1012,10 @@ static void test_SetTextJustification(void)
"nulla pariatur. Excepteur sint occaecat cupidatat non proident, "
"sunt in culpa qui officia deserunt mollit anim id est laborum.";
hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0, 400,400, 0, 0, 0, NULL);
GetClientRect( hwnd, &clientArea );
hdc = GetDC( hwnd );
memset(&lf, 0, sizeof lf);
lf.lfCharSet = ANSI_CHARSET;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
......@@ -1024,7 +1029,8 @@ static void test_SetTextJustification(void)
testJustification(hdc, testText, &clientArea);
DeleteObject(hfont);
ReleaseDC(0, hdc);
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
}
static void test_font_charset(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment