user32: update DrawText tests to cover behavior differences on win98

Dmitry Timoshkov dmitry at codeweavers.com
Mon Oct 13 21:02:09 CDT 2008


"Aric Stewart" <aric at codeweavers.com> wrote:

> diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c
> index 86655d6..3677d2f 100644
> --- a/dlls/user32/tests/text.c
> +++ b/dlls/user32/tests/text.c
> @@ -674,13 +674,20 @@ static void test_DrawState(void)
>     SetLastError(0xdeadbeef);
>     ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, strlen(text),
>                     0, 0, 10, 10, DST_TEXT);
> -    ok(!ret, "DrawState succeeded\n");
> +    /* succeeds on windows 98 */
> +    if (ret)
> +        win_skip("DrawState succeeds on Windows 98\n");
> +    else
> +        ok(!ret, "DrawState succeeded\n");
>     ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError());
> 
>     SetLastError(0xdeadbeef);
>     ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, 0,
>                     0, 0, 10, 10, DST_TEXT);
> -    ok(!ret, "DrawState succeeded\n");
> +    if (ret)
> +        win_skip("DrawState succeeds on Windows 98\n");
> +    else
> +        ok(!ret, "DrawState succeeded\n");
>     ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError());
> 
>     ReleaseDC(hwnd, hdc);

skip()/win_skip() are supposed to be used when the test(s) are going to be skipped
due to some condition, in this case nothing is skipped, and broken() sounds like
a better choice.

-- 
Dmitry.



More information about the wine-devel mailing list