gdi32/tests: Some GdiAlphaBlend tests
Roderick Colenbrander
thunderbird2k at gmail.com
Wed Sep 9 08:16:30 CDT 2009
Regarding the zero source DC, what happens visually?
On Wed, Sep 9, 2009 at 1:30 PM, Nikolay Sivov<bunglehead at gmail.com> wrote:
> Bug http://bugs.winehq.org/show_bug.cgi?id=18041 shows this commented crash.
> I'm not sure how to fix it, but I think this call can't do anything
> without source context.
>
> Another question is where to place such check - in gdi32 or winex11...any
> advices are welcome.
>
> Changelog:
> - Some GdiAlphaBlend tests
>
> >From a59cadcf03edeefff95c340230a47c9c3c60727f Mon Sep 17 00:00:00 2001
> From: Nikolay Sivov <bunglehead at gmail.com>
> Date: Wed, 9 Sep 2009 15:20:34 +0400
> Subject: Some GdiAlphaBlend tests
>
> ---
> dlls/gdi32/tests/bitmap.c | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c
> index 8666da2..38acd09 100644
> --- a/dlls/gdi32/tests/bitmap.c
> +++ b/dlls/gdi32/tests/bitmap.c
> @@ -2376,6 +2376,25 @@ static void test_GdiAlphaBlend(void)
> blend.SourceConstantAlpha = 128;
> blend.AlphaFormat = 0;
>
> + /* zero dimensions */
> + SetLastError(0xdeadbeef);
> + expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 0, 0, hdcSrc, 0, 0, 20, 20, blend), TRUE, BOOL, "%d");
> + expect_eq(GetLastError(), 0xdeadbeef, int, "%d");
> + SetLastError(0xdeadbeef);
> + expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, 0, 0, 0, blend), TRUE, BOOL, "%d");
> + expect_eq(GetLastError(), 0xdeadbeef, int, "%d");
> +
> + SetLastError(0xdeadbeef);
> + expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 0, 0, hdcSrc, 0, 0, 0, 0, blend), TRUE, BOOL, "%d");
> + expect_eq(GetLastError(), 0xdeadbeef, int, "%d");
> +
> +#if 0
> + /* zero source HDC - crashes on wine, works on native */
> + SetLastError(0xdeadbeef);
> + expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, NULL, 0, 0, 20, 20, blend), FALSE, BOOL, "%d");
> + expect_eq(GetLastError(), 0xdeadbeef, int, "%d");
> +#endif
> +
> expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, 0, 20, 20, blend), TRUE, BOOL, "%d");
> SetLastError(0xdeadbeef);
> expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, -1, 0, 10, 10, blend), FALSE, BOOL, "%d");
> --
> 1.5.6.5
>
>
>
>
>
More information about the wine-devel
mailing list