On 18 April 2016 at 19:00, Aaryaman Vasishta <jem456.vasishta@gmail.com> wrote:
> diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
> index a8f9c40..2b0174d 100644
> --- a/dlls/d3drm/tests/d3drm.c
> +++ b/dlls/d3drm/tests/d3drm.c
> @@ -1269,7 +1269,8 @@ static void test_destroy_callback(unsigned int test_idx, REFCLSID clsid, REFIID
> context.test_idx = test_idx;
> context.obj = obj;
>
> - hr = IDirect3DRMObject_AddDestroyCallback(obj, NULL, &context);
> + if ((hr = IDirect3DRMObject_AddDestroyCallback(obj, NULL, &context)) != D3DRMERR_BADVALUE)
> + return;
I don't think we want that. Doing this means we won't notice when the
function starts returning the wrong value, and the following tests get
effectively disabled too in that case.
> + hr = IDirect3DRM_CreateObject(d3drm1, &CLSID_DirectDraw, NULL, &IID_IDirectDraw, (void **)&unknown);
> + ok(hr == CLASSFACTORY_E_FIRST, "Expected hr == CLASSFACTORY_E_FIRST, got %#x.\n", hr);
> + ok(!unknown, "Expected object returned == NULL, got %p.\n", unknown);
It would be better to initialise "unknown" with some known value
before calling CreateObject(). Like this, if CreateObject() doesn't
touch the value, the test may randomly pass or fail depending on what
the initial value of "unknown" ends up being.