[1/2] user32/tests/cursoricon.c: DrawState: New Testcase for correct drawing of Icons

Nicolas Le Cam niko.lecam at gmail.com
Thu Oct 1 19:02:04 CDT 2009


2009/10/1 Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com>:
> [1/2] New Testcase to check if DrawState() behaves correctly when drawing Icons.
>
> affected files: dlls/user32/tests/cursoricon.c
>
> Currently checks:
>
> - if the Icons are drawn at the correct size. Should always be the
> original icon size,
>  independent of the width and height parameters passed to DrawState().
> - if Icons without a bit-mask are drawn with correct color.
> - if Icons with a bit-mask are drawn with correct color.
>
> Test is successful in WindowsXP SP2, but fails in git-Wine, because
> the Icons are
> drawn too big.
>
> ----
>
> [2/2] Make Wine pass the new Testcase and Fix Regression Bug 20153
>
> affected files: dlls/user32/uitools.c
>
> Make DrawState() use the Icon dimensions when drawing. This makes it pass all
> in [1/2] implemented tests and fixes regression
> http://bugs.winehq.org/show_bug.cgi?id=20153 . The width and height, that are
> passed to UITOOLS_DrawStateJam() are taken directly from the icon that is to be
> drawn (see implementation of UITOOLS_DrawState()), therefore it is correct to
> simply use them as the target drawing dimensions.
>
> Note: This fix was sent before without the testcase (see
> http://www.winehq.org/pipermail/wine-patches/2009-September/078927.html),
> but not committed. Didn't get feedback on that, so I guessed the reason was the
> missing testcase.
>
> ----
>
> Feedback is welcome!
>
> Wilfried Pasquazzo
>
> PS: When this gets committed, I can add other tests for DrawState(),
> to e.g. test for
> correct drawing of the "Disabled" effect.
>
>
>
>

Hi Wilfried,

If test fails on Wine, mark them todo_wine.

-- 
Nicolas Le Cam



More information about the wine-devel mailing list