Commit 7979b879 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

gdi32/tests: Update expected ExtCreateRegion behavior to represent newer Windows.

parent 107bba15
...@@ -225,7 +225,9 @@ static void test_ExtCreateRegion(void) ...@@ -225,7 +225,9 @@ static void test_ExtCreateRegion(void)
hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) - 1, &rgn.data); hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) - 1, &rgn.data);
todo_wine todo_wine
ok(!hrgn, "ExtCreateRegion should fail\n"); ok(!hrgn, "ExtCreateRegion should fail\n");
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError()); todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), "0xdeadbeef, got %u\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
...@@ -237,32 +239,12 @@ static void test_ExtCreateRegion(void) ...@@ -237,32 +239,12 @@ static void test_ExtCreateRegion(void)
SetRectEmpty(&rgn.data.rdh.rcBound); SetRectEmpty(&rgn.data.rdh.rcBound);
memcpy(rgn.data.Buffer, &rc, sizeof(rc)); memcpy(rgn.data.Buffer, &rc, sizeof(rc));
/* With a single rect this seems to work... */
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + sizeof(RECT) - 1, &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError());
verify_region(hrgn, &rc);
DeleteObject(hrgn);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError()); ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError());
verify_region(hrgn, &rc); verify_region(hrgn, &rc);
DeleteObject(hrgn); DeleteObject(hrgn);
rgn.data.rdh.dwSize = sizeof(rgn.data.rdh) + 1;
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, 1, &rgn.data);
ok(hrgn != 0 ||
broken(GetLastError() == 0xdeadbeef), /* NT4 */
"ExtCreateRegion error %u\n", GetLastError());
if(hrgn)
{
verify_region(hrgn, &rc);
DeleteObject(hrgn);
}
xform.eM11 = 0.5; /* 50% width */ xform.eM11 = 0.5; /* 50% width */
xform.eM12 = 0.0; xform.eM12 = 0.0;
xform.eM21 = 0.0; xform.eM21 = 0.0;
...@@ -270,8 +252,6 @@ static void test_ExtCreateRegion(void) ...@@ -270,8 +252,6 @@ static void test_ExtCreateRegion(void)
xform.eDx = 20.0; xform.eDx = 20.0;
xform.eDy = 40.0; xform.eDy = 40.0;
rgn.data.rdh.dwSize = sizeof(rgn.data.rdh);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(&xform, sizeof(rgn), &rgn.data); hrgn = ExtCreateRegion(&xform, sizeof(rgn), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u/%x\n", GetLastError(), GetLastError()); ok(hrgn != 0, "ExtCreateRegion error %u/%x\n", GetLastError(), GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment