ddraw/tests: Add another invalid arguments test for surface QI.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2018-01-05 18:50:40 +03:00 committed by Alexandre Julliard
parent f427714bf9
commit 030803b422
5 changed files with 4 additions and 28 deletions

View File

@ -1963,6 +1963,7 @@ static void test_surface_qi(void)
{&IID_IDirectDrawPalette, NULL, E_INVALIDARG },
{&IID_IDirectDrawClipper, NULL, E_INVALIDARG },
{&IID_IUnknown, &IID_IDirectDrawSurface, S_OK },
{NULL, NULL, E_INVALIDARG },
};
IDirectDrawSurface *surface;

View File

@ -2083,6 +2083,7 @@ static void test_surface_qi(void)
{&IID_IDirectDrawPalette, NULL, E_INVALIDARG },
{&IID_IDirectDrawClipper, NULL, E_INVALIDARG },
{&IID_IUnknown, &IID_IDirectDrawSurface, S_OK },
{NULL, NULL, E_INVALIDARG },
};
IDirectDrawSurface *surface;

View File

@ -2233,6 +2233,7 @@ static void test_surface_qi(void)
{&IID_IDirectDrawPalette, NULL, E_INVALIDARG },
{&IID_IDirectDrawClipper, NULL, E_INVALIDARG },
{&IID_IUnknown, &IID_IDirectDrawSurface, S_OK },
{NULL, NULL, E_INVALIDARG },
};
IDirectDrawSurface4 *surface;

View File

@ -1970,6 +1970,7 @@ static void test_surface_qi(void)
{&IID_IDirectDrawPalette, NULL, E_NOINTERFACE},
{&IID_IDirectDrawClipper, NULL, E_NOINTERFACE},
{&IID_IUnknown, &IID_IDirectDrawSurface, S_OK },
{NULL, NULL, E_INVALIDARG },
};
IDirectDrawSurface7 *surface;

View File

@ -61,33 +61,6 @@ static void ReleaseDirectDraw(void)
}
}
static void QueryInterface(void)
{
IDirectDrawSurface *dsurface;
DDSURFACEDESC surface;
void *object;
HRESULT ret;
/* Create a surface */
ZeroMemory(&surface, sizeof(surface));
surface.dwSize = sizeof(surface);
surface.dwFlags = DDSD_WIDTH | DDSD_HEIGHT;
surface.dwHeight = 10;
surface.dwWidth = 10;
ret = IDirectDraw_CreateSurface(lpDD, &surface, &dsurface, NULL);
if(ret != DD_OK)
{
ok(FALSE, "IDirectDraw::CreateSurface failed with error %x\n", ret);
return;
}
/* Call IUnknown::QueryInterface */
ret = IDirectDrawSurface_QueryInterface(dsurface, 0, &object);
ok(ret == DDERR_INVALIDPARAMS, "IDirectDrawSurface::QueryInterface returned %x\n", ret);
IDirectDrawSurface_Release(dsurface);
}
/* The following tests test which interface is returned by IDirectDrawSurfaceX::GetDDInterface.
* It uses refcounts to test that and compares the interface addresses. Partially fits here, and
* partially in the refcount test
@ -2632,7 +2605,6 @@ START_TEST(dsurface)
return;
}
QueryInterface();
GetDDInterface_1();
GetDDInterface_2();
GetDDInterface_4();