gdi32/tests: Add test for SelectClipRgn in metafile

Dmitry Timoshkov dmitry at codeweavers.com
Fri Sep 4 11:58:23 CDT 2009


"Ilya Shpigor" <shpigor at etersoft.ru> wrote:

> +    hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL);
> +
> +    SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
> +    hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom);
> +    SelectClipRgn(hdc, hrgn);
> +    GetClipBox(hdc, &rc_res);
> +    todo_wine ok(EqualRect(&rc_res, &rc_sclip),
> +                 "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n",
> +                 rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
> +                 rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
> +
> +    CloseEnhMetaFile(hdc);
> +    DeleteObject(hrgn);

You are leaking a metafile here.

-- 
Dmitry.



More information about the wine-devel mailing list