Commit 3f304014 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32/tests: Add some tests for SetMiterLimit() argument validation.

parent 5b471a29
......@@ -38,6 +38,8 @@ static void test_dc_values(void)
HDC hdc = CreateDCA("DISPLAY", NULL, NULL, NULL);
COLORREF color;
int extra, attr;
float limit;
BOOL ret;
ok( hdc != NULL, "CreateDC failed\n" );
color = SetBkColor( hdc, 0x12345678 );
......@@ -91,6 +93,25 @@ static void test_dc_values(void)
ok(!attr, "GetDeviceCaps rets %d\n", attr);
ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() = %lu\n", GetLastError());
/* Miter limit */
limit = 123.0f;
ret = GetMiterLimit(hdc, &limit);
ok(ret, "Unexpected return value.\n");
ok(limit == 10.0f, "Unexpected default miter limit %f.\n", limit);
limit = 456.0;
ret = SetMiterLimit(hdc, 0.9f, &limit);
todo_wine
ok(!ret, "Unexpected return value.\n");
todo_wine
ok(limit == 456.0f, "Unexpected default miter limit %f.\n", limit);
limit = 0.0;
ret = SetMiterLimit(hdc, 1.0f, &limit);
ok(ret, "Unexpected return value.\n");
todo_wine
ok(limit == 10.0f, "Unexpected default miter limit %f.\n", limit);
DeleteDC( hdc );
}
......
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