-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
I think it'd be a good idea to add some lines testing InitFromImage on
a texture that was created with CreateTexture and trying to call
InitFromImage twice (with the first call succeeding).
Am 2016-04-24 um 06:46 schrieb Aaryaman Vasishta:
> + /* InitFromImage tests */
> + d3drm_img = NULL;
> + hr = IDirect3DRM2_CreateObject(d3drm2, &CLSID_CDirect3DRMTexture, NULL, &IID_IDirect3DRMTexture2, (void **)&texture2);
> + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMTexture2 interface (hr = %x).\n", hr);
> + ref2 = get_refcount((IUnknown *)texture2);
Did you forget IDirect3DRM::CreateObject(Texture1), or is there a
reason why it is omitted?
> + hr = IDirect3DRMTexture2_InitFromImage(texture2, NULL);
> + todo_wine ok(hr == D3DRMERR_BADOBJECT, "Expected hr == D3DRMERR_BADOBJECT, got %x.\n", hr);
> + ref3 = get_refcount((IUnknown *)texture2);
> + ok(ref3 == ref2, "expected ref3 == ref2, got ref2 = %u , ref3 = %u.\n", ref2, ref3);
You're not testing the reference count of d3drm1/2/3. My guess is that
you plan to add this later since the InitFrom() increments it, and not
the create. Is my understanding of your plans correct?