Ziqing Hui : d3dx10/tests: Test texture returned by D3DX10CreateTextureFromMemory on failure.
Module: wine Branch: master Commit: dd55d9ce1b4a4ce094caa972f8a3a1cbe5a6df00 URL: https://source.winehq.org/git/wine.git/?a=commit;h=dd55d9ce1b4a4ce094caa972f... Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu Jul 1 14:08:31 2021 +0800 d3dx10/tests: Test texture returned by D3DX10CreateTextureFromMemory on failure. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx10_43/tests/d3dx10.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 47f6e337f2e..6486b06e7df 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -1971,17 +1971,29 @@ static void test_create_texture(void) /* D3DX10CreateTextureFromMemory tests */ - todo_wine - { + resource = (ID3D10Resource *)0xdeadbeef; hr = D3DX10CreateTextureFromMemory(device, NULL, 0, NULL, NULL, &resource, NULL); + todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(resource == (ID3D10Resource *)0xdeadbeef, "Got unexpected resource %p.\n", resource); + + resource = (ID3D10Resource *)0xdeadbeef; hr = D3DX10CreateTextureFromMemory(device, NULL, sizeof(test_bmp_1bpp), NULL, NULL, &resource, NULL); + todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(resource == (ID3D10Resource *)0xdeadbeef, "Got unexpected resource %p.\n", resource); + + resource = (ID3D10Resource *)0xdeadbeef; hr = D3DX10CreateTextureFromMemory(device, test_bmp_1bpp, 0, NULL, NULL, &resource, NULL); + todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(resource == (ID3D10Resource *)0xdeadbeef, "Got unexpected resource %p.\n", resource); + + resource = (ID3D10Resource *)0xdeadbeef; hr = D3DX10CreateTextureFromMemory(device, test_bmp_1bpp, sizeof(test_bmp_1bpp) - 1, NULL, NULL, &resource, NULL); + todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); - } + ok(resource == (ID3D10Resource *)0xdeadbeef, "Got unexpected resource %p.\n", resource); for (i = 0; i < ARRAY_SIZE(test_image); ++i) {
participants (1)
-
Alexandre Julliard