From 35939bbe0c04534da07ece7f6a47a560d356f7a1 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Thu, 9 Jun 2022 20:07:55 +0200 Subject: [PATCH] d3dx10/tests: Add a test for loading an invalid resource from a valid module. Signed-off-by: Matteo Bruni --- dlls/d3dx10_43/tests/d3dx10.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 0a297188e19..0c6c4e5c8ce 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -2120,6 +2120,11 @@ static void test_get_image_info(void) winetest_push_context("Test %u", i); resource_module = create_resource_module(test_resource_name, test_image[i].data, test_image[i].size); + hr2 = 0xdeadbeef; + hr = D3DX10GetImageInfoFromResourceW(resource_module, L"deadbeef", NULL, &image_info, &hr2); + ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr); + ok(hr2 == 0xdeadbeef, "Got unexpected hr2 %#x.\n", hr2); + hr2 = 0xdeadbeef; hr = D3DX10GetImageInfoFromResourceW(resource_module, test_resource_name, NULL, &image_info, &hr2); ok(hr == S_OK || broken(hr == E_FAIL && test_image[i].expected_info.ImageFileFormat == D3DX10_IFF_WMP)