Commit 6c0f864c authored by Aaryaman Vasishta's avatar Aaryaman Vasishta Committed by Alexandre Julliard

d3drm/tests: Add tests for invalid interfaces in IDirect3DRM::QueryInterface.

parent c3c9cd1e
TESTDLL = d3drm.dll
IMPORTS = dxguid ddraw user32 uuid
IMPORTS = dxguid uuid d3drm ddraw user32
C_SRCS = \
d3drm.c \
......
......@@ -1788,10 +1788,74 @@ static void test_d3drm_qi(void)
{
static const struct qi_test tests[] =
{
{ &IID_IDirect3DRM3, &IID_IDirect3DRM3, S_OK, TRUE },
{ &IID_IDirect3DRM2, &IID_IDirect3DRM2, S_OK, TRUE },
{ &IID_IDirect3DRM, &IID_IDirect3DRM, S_OK, FALSE },
{ &IID_IUnknown, &IID_IDirect3DRM, S_OK, FALSE },
{ &IID_IDirect3DRM3, &IID_IDirect3DRM3, S_OK, TRUE },
{ &IID_IDirect3DRM2, &IID_IDirect3DRM2, S_OK, TRUE },
{ &IID_IDirect3DRM, &IID_IDirect3DRM, S_OK, FALSE },
{ &IID_IDirect3DRMDevice, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMObject, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMObject2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMDevice2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMDevice3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMViewport, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMViewport2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFrame, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFrame2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFrame3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMVisual, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMesh, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMeshBuilder, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMeshBuilder2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMeshBuilder3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFace, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFace2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMLight, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMTexture, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMTexture2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMTexture3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMWrap, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMaterial, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMMaterial2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMAnimation, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMAnimation2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMAnimationSet, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMAnimationSet2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMObjectArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMDeviceArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMViewportArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFrameArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMVisualArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMLightArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMPickedArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMFaceArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMAnimationArray, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMUserVisual, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMShadow, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMShadow2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMInterpolator, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMProgressiveMesh, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMPicked2Array, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DRMClippedVisual, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawClipper, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawSurface7, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawSurface4, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawSurface3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawSurface2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDrawSurface, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DDevice7, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DDevice3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DDevice2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DDevice, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3D7, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3D3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3D2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3D, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDraw7, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDraw4, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDraw3, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDraw2, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirectDraw, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IDirect3DLight, NULL, CLASS_E_CLASSNOTAVAILABLE, FALSE },
{ &IID_IUnknown, &IID_IDirect3DRM, S_OK, FALSE },
};
HRESULT hr;
IDirect3DRM *d3drm;
......
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