Nikolay Sivov : gdi32/tests: Add some tests for FixBrushOrgEx().
Module: wine Branch: master Commit: e04e10b37bcba953f0b0e43caf0efca09da5a75c URL: https://gitlab.winehq.org/wine/wine/-/commit/e04e10b37bcba953f0b0e43caf0efca... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 9 15:25:14 2023 +0200 gdi32/tests: Add some tests for FixBrushOrgEx(). It appears to be a stub on modern systems. Does not generate EMF output either. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/gdi32/tests/brush.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/tests/brush.c b/dlls/gdi32/tests/brush.c index b23e73ac65f..8df3c48a20d 100644 --- a/dlls/gdi32/tests/brush.c +++ b/dlls/gdi32/tests/brush.c @@ -411,16 +411,36 @@ static void test_brush_org( void ) { HDC hdc = GetDC( 0 ); POINT old, pt; + BOOL ret; - SetBrushOrgEx( hdc, 0, 0, &old ); + ret = SetBrushOrgEx( hdc, 0, 0, &old ); + ok(ret, "Unexpected return value %d.\n", ret); - SetBrushOrgEx( hdc, 1, 1, &pt ); + ret = SetBrushOrgEx( hdc, 1, 1, &pt ); + ok(ret, "Unexpected return value %d.\n", ret); ok( pt.x == 0 && pt.y == 0, "got %ld,%ld\n", pt.x, pt.y ); - SetBrushOrgEx( hdc, 0x10000, -1, &pt ); + ret = SetBrushOrgEx( hdc, 0x10000, -1, &pt ); + ok(ret, "Unexpected return value %d.\n", ret); ok( pt.x == 1 && pt.y == 1, "got %ld,%ld\n", pt.x, pt.y ); - SetBrushOrgEx( hdc, old.x, old.y, &pt ); + ret = SetBrushOrgEx( hdc, old.x, old.y, &pt ); + ok(ret, "Unexpected return value %d.\n", ret); ok( pt.x == 0x10000 && pt.y == -1, "got %ld,%ld\n", pt.x, pt.y ); + ret = GetBrushOrgEx( hdc, &pt ); + ok(ret, "Unexpected return value %d.\n", ret); + ok( pt.x == 0 && pt.y == 0, "got %ld,%ld\n", pt.x, pt.y ); + pt.x = 10; + pt.y = 20; + ret = FixBrushOrgEx( hdc, 2, 3, &pt ); + todo_wine + ok(!ret, "Unexpected return value %d.\n", ret); + todo_wine + ok( pt.x == 10 && pt.y == 20, "got %ld,%ld\n", pt.x, pt.y ); + ret = GetBrushOrgEx( hdc, &pt ); + ok(ret, "Unexpected return value %d.\n", ret); + todo_wine + ok( pt.x == 0 && pt.y == 0, "got %ld,%ld\n", pt.x, pt.y ); + ReleaseDC( 0, hdc ); }
participants (1)
-
Alexandre Julliard