Commit dd55d9ce authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

d3dx10/tests: Test texture returned by D3DX10CreateTextureFromMemory on failure.

parent 6a9752bf
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment