d3dx10/tests: Test texture returned by D3DX10CreateTextureFromMemory on failure.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6a9752bf5e
commit
dd55d9ce1b
|
@ -1971,17 +1971,29 @@ static void test_create_texture(void)
|
||||||
|
|
||||||
/* D3DX10CreateTextureFromMemory tests */
|
/* D3DX10CreateTextureFromMemory tests */
|
||||||
|
|
||||||
todo_wine
|
resource = (ID3D10Resource *)0xdeadbeef;
|
||||||
{
|
|
||||||
hr = D3DX10CreateTextureFromMemory(device, NULL, 0, NULL, NULL, &resource, NULL);
|
hr = D3DX10CreateTextureFromMemory(device, NULL, 0, NULL, NULL, &resource, NULL);
|
||||||
|
todo_wine
|
||||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
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);
|
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(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);
|
hr = D3DX10CreateTextureFromMemory(device, test_bmp_1bpp, 0, NULL, NULL, &resource, NULL);
|
||||||
|
todo_wine
|
||||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
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);
|
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(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)
|
for (i = 0; i < ARRAY_SIZE(test_image); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue