v2: Add todo_wine(s) which will be removed in the next patch in this series. Signed-off-by: Aaryaman Vasishta jem456.vasishta@gmail.com --- dlls/d3drm/tests/d3drm.c | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 4ed90ca682..c5e7478b06 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -5598,6 +5598,50 @@ static void test_load_texture(void) ok(SUCCEEDED(hr), "Failed to get IDirect3DRM3 interface, hr %#x.\n", hr); ref1 = get_refcount((IUnknown *)d3drm1);
+ /* Test all failures together */ + texture1 = (IDirect3DRMTexture *)0xdeadbeef; + hr = IDirect3DRM_LoadTexture(d3drm1, NULL, &texture1); + todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr); + todo_wine ok(!texture1, "Expected texture returned == NULL, got %p.\n", texture1); + texture1 = (IDirect3DRMTexture *)0xdeadbeef; + hr = IDirect3DRM_LoadTexture(d3drm1, "", &texture1); + todo_wine ok(!texture1, "Expected texture returned == NULL, got %p.\n", texture1); + todo_wine ok(hr == D3DRMERR_FILENOTFOUND, "Expected hr == D3DRMERR_FILENOTFOUND, got %#x.\n", hr); + if (hr == D3DRMERR_FILENOTFOUND) + { + hr = IDirect3DRM_LoadTexture(d3drm1, NULL, NULL); + ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr); + } + + + texture2 = (IDirect3DRMTexture2 *)0xdeadbeef; + hr = IDirect3DRM2_LoadTexture(d3drm2, NULL, &texture2); + todo_wine ok(hr == D3DRMERR_FILENOTFOUND, "Expected hr == D3DRMERR_FILENOTFOUND, got %#x.\n", hr); + todo_wine ok(!texture2, "Expected texture returned == NULL, got %p.\n", texture2); + texture2 = (IDirect3DRMTexture2 *)0xdeadbeef; + hr = IDirect3DRM2_LoadTexture(d3drm2, "", &texture2); + todo_wine ok(!texture2, "Expected texture returned == NULL, got %p.\n", texture2); + todo_wine ok(hr == D3DRMERR_FILENOTFOUND, "Expected hr == D3DRMERR_FILENOTFOUND, got %#x.\n", hr); + if (hr == D3DRMERR_FILENOTFOUND) + { + hr = IDirect3DRM2_LoadTexture(d3drm2, NULL, NULL); + ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr); + } + + texture3 = (IDirect3DRMTexture3 *)0xdeadbeef; + hr = IDirect3DRM3_LoadTexture(d3drm3, NULL, &texture3); + todo_wine ok(hr == D3DRMERR_FILENOTFOUND, "Expected hr == D3DRMERR_FILENOTFOUND, got %#x.\n", hr); + todo_wine ok(!texture3, "Expected texture returned == NULL, got %p.\n", texture3); + texture3 = (IDirect3DRMTexture3 *)0xdeadbeef; + hr = IDirect3DRM_LoadTexture(d3drm3, "", &texture3); + todo_wine ok(hr == D3DRMERR_FILENOTFOUND, "Expected hr == D3DRMERR_FILENOTFOUND, got %#x.\n", hr); + todo_wine ok(!texture3, "Expected texture returned == NULL, got %p.\n", texture3); + if (hr == D3DRMERR_FILENOTFOUND) + { + hr = IDirect3DRM3_LoadTexture(d3drm3, NULL, NULL); + ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr); + } + for (i = 0; i < ARRAY_SIZE(tests); ++i) { filename = create_bitmap(tests[i].w, tests[i].h, tests[i].palettized);