<div dir="ltr">Sorry for the late reply, I was sick for the last couple of days.<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 19, 2016 at 6:05 PM, Henri Verbeet <span dir="ltr"><<a href="mailto:hverbeet@gmail.com" target="_blank">hverbeet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 18 April 2016 at 19:00, Aaryaman Vasishta <<a href="mailto:jem456.vasishta@gmail.com" target="_blank">jem456.vasishta@gmail.com</a>> wrote:<br>
> diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c<br>
> index a8f9c40..2b0174d 100644<br>
> --- a/dlls/d3drm/tests/d3drm.c<br>
> +++ b/dlls/d3drm/tests/d3drm.c<br>
> @@ -1269,7 +1269,8 @@ static void test_destroy_callback(unsigned int test_idx, REFCLSID clsid, REFIID<br>
>      context.test_idx = test_idx;<br>
>      context.obj = obj;<br>
><br>
> -    hr = IDirect3DRMObject_AddDestroyCallback(obj, NULL, &context);<br>
> +    if ((hr = IDirect3DRMObject_AddDestroyCallback(obj, NULL, &context)) != D3DRMERR_BADVALUE)<br>
> +        return;<br>
</span>I don't think we want that. Doing this means we won't notice when the<br>
function starts returning the wrong value, and the following tests get<br>
effectively disabled too in that case. <br><br></blockquote><div>I do agree, but what should we do when a new object is implemented? If it's okay to extend CreateObject to include the new interface as well as implement Add/Delete destroy callbacks in the same patch, then there's no problem going with this. I had intended to keep the return statement in case a new object was added into CreateObject, but the destroy callback functions for that object weren't implemented. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
> +    hr = IDirect3DRM_CreateObject(d3drm1, &CLSID_DirectDraw, NULL, &IID_IDirectDraw, (void **)&unknown);<br>
> +    ok(hr == CLASSFACTORY_E_FIRST, "Expected hr == CLASSFACTORY_E_FIRST, got %#x.\n", hr);<br>
> +    ok(!unknown, "Expected object returned == NULL, got %p.\n", unknown);<br>
</span>It would be better to initialise "unknown" with some known value<br>
before calling CreateObject(). Like this, if CreateObject() doesn't<br>
touch the value, the test may randomly pass or fail depending on what<br>
the initial value of "unknown" ends up being.<br>
<br></blockquote><div>Right, I'll resend the patch with the changes right away.<br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div><div> <br></div></div><br></div></div></div></div>