From e04e10b37bcba953f0b0e43caf0efca09da5a75c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 9 Oct 2023 15:25:14 +0200 Subject: [PATCH] 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 --- 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 ); }