ddraw/tests: Allow the clip region to contain multiple rectangles.

This commit is contained in:
Alexandre Julliard 2012-09-13 23:35:18 +02:00
parent ed8d665f8c
commit 83cfd54f85
2 changed files with 4 additions and 16 deletions

View File

@ -665,7 +665,7 @@ static void test_coop_level_create_device_window(void)
static void test_clipper_blt(void)
{
IDirectDrawSurface4 *src_surface, *dst_surface;
RECT client_rect, src_rect, *rect;
RECT client_rect, src_rect;
IDirectDrawClipper *clipper;
DDSURFACEDESC2 surface_desc;
unsigned int i, j, x, y;
@ -731,18 +731,12 @@ static void test_clipper_blt(void)
ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr);
ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize);
ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType);
ok(rgn_data->rdh.nCount == 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount);
ok(rgn_data->rdh.nRgnSize == 16, "Got unexpected region size %u.\n", rgn_data->rdh.nRgnSize);
ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount);
ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect),
"Got unexpected bounding rect {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n",
rgn_data->rdh.rcBound.left, rgn_data->rdh.rcBound.top,
rgn_data->rdh.rcBound.right, rgn_data->rdh.rcBound.bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
rect = (RECT *)&rgn_data->Buffer[0];
ok(EqualRect(rect, &client_rect),
"Got unexpected clip rect {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n",
rect->left, rect->top, rect->right, rect->bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
HeapFree(GetProcessHeap(), 0, rgn_data);
r1 = CreateRectRgn(0, 0, 320, 240);

View File

@ -617,7 +617,7 @@ static void test_coop_level_create_device_window(void)
static void test_clipper_blt(void)
{
IDirectDrawSurface7 *src_surface, *dst_surface;
RECT client_rect, src_rect, *rect;
RECT client_rect, src_rect;
IDirectDrawClipper *clipper;
DDSURFACEDESC2 surface_desc;
unsigned int i, j, x, y;
@ -683,18 +683,12 @@ static void test_clipper_blt(void)
ok(SUCCEEDED(hr), "Failed to get clip list, hr %#x.\n", hr);
ok(rgn_data->rdh.dwSize == sizeof(rgn_data->rdh), "Got unexpected structure size %#x.\n", rgn_data->rdh.dwSize);
ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType);
ok(rgn_data->rdh.nCount == 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount);
ok(rgn_data->rdh.nRgnSize == 16, "Got unexpected region size %u.\n", rgn_data->rdh.nRgnSize);
ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount);
ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect),
"Got unexpected bounding rect {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n",
rgn_data->rdh.rcBound.left, rgn_data->rdh.rcBound.top,
rgn_data->rdh.rcBound.right, rgn_data->rdh.rcBound.bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
rect = (RECT *)&rgn_data->Buffer[0];
ok(EqualRect(rect, &client_rect),
"Got unexpected clip rect {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n",
rect->left, rect->top, rect->right, rect->bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
HeapFree(GetProcessHeap(), 0, rgn_data);
r1 = CreateRectRgn(0, 0, 320, 240);