[PATCH 3/3] d3drm/tests: Add tests for IDirect3DRMTexture{2-3}_InitFromImage.
Aaryaman Vasishta
jem456.vasishta at gmail.com
Sun Apr 24 00:40:40 CDT 2016
Signed-off-by: Aaryaman Vasishta <jem456.vasishta at gmail.com>
---
dlls/d3drm/tests/d3drm.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
index 998fc7b..ffc67dd 100644
--- a/dlls/d3drm/tests/d3drm.c
+++ b/dlls/d3drm/tests/d3drm.c
@@ -1819,6 +1819,29 @@ static void test_Texture(void)
ref4 = get_refcount((IUnknown *)d3drm3);
ok(ref4 == ref1, "expected ref4 == ref1, got ref1 = %u, ref4 = %u.\n", ref1, ref4);
+ /* InitFromImage tests */
+ 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);
+ 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);
+ hr = IDirect3DRMTexture2_InitFromImage(texture2, &initimg);
+ todo_wine ok(SUCCEEDED(hr), "Cannot initialize IDirect3DRMTexture2 from image (hr = %x).\n", hr);
+ IDirect3DRMTexture2_Release(texture2);
+
+ hr = IDirect3DRM3_CreateObject(d3drm3, &CLSID_CDirect3DRMTexture, NULL, &IID_IDirect3DRMTexture3, (void **)&texture3);
+ ok(SUCCEEDED(hr), "Cannot get IDirect3DRMTexture3 interface (hr = %x).\n", hr);
+ ref2 = get_refcount((IUnknown *)texture3);
+ hr = IDirect3DRMTexture3_InitFromImage(texture3, NULL);
+ todo_wine ok(hr == D3DRMERR_BADOBJECT, "Expected hr == D3DRMERR_BADOBJECT, got %x.\n", hr);
+ ref3 = get_refcount((IUnknown *)texture3);
+ ok(ref3 == ref2, "expected ref3 == ref2, got ref2 = %u , ref3 = %u.\n", ref2, ref3);
+ hr = IDirect3DRMTexture3_InitFromImage(texture3, &initimg);
+ todo_wine ok(SUCCEEDED(hr), "Cannot initialize IDirect3DRMTexture3 from image (hr = %x).\n", hr);
+ IDirect3DRMTexture3_Release(texture3);
+
IDirect3DRM3_Release(d3drm3);
IDirect3DRM2_Release(d3drm2);
IDirect3DRM_Release(d3drm1);
--
2.3.2 (Apple Git-55)
More information about the wine-patches
mailing list