Ziqing Hui : d3dx10/tests: Add tests for D3DX10GetImageInfoFromFileW().
Alexandre Julliard
julliard at winehq.org
Wed Sep 9 15:42:27 CDT 2020
Module: wine
Branch: master
Commit: b341009993a863b8d74d0a979d85cbb4cf79ec35
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b341009993a863b8d74d0a979d85cbb4cf79ec35
Author: Ziqing Hui <zhui at codeweavers.com>
Date: Tue Sep 8 22:41:51 2020 +0200
d3dx10/tests: Add tests for D3DX10GetImageInfoFromFileW().
Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx10_43/tests/d3dx10.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index f1d3328487..640e83fcd0 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -1357,7 +1357,9 @@ static void test_D3DX10CreateAsyncResourceLoader(void)
static void test_get_image_info(void)
{
+ static const WCHAR test_filename[] = L"image.data";
D3DX10_IMAGE_INFO image_info;
+ WCHAR path[MAX_PATH];
unsigned int i;
DWORD dword;
HRESULT hr;
@@ -1381,6 +1383,27 @@ static void test_get_image_info(void)
check_image_info(&image_info, i, __LINE__);
}
+ todo_wine {
+ hr = D3DX10GetImageInfoFromFileW(NULL, NULL, &image_info, NULL);
+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ hr = D3DX10GetImageInfoFromFileW(L"deadbeaf", NULL, &image_info, NULL);
+ ok(hr == D3D10_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#x.\n", hr);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(test_image); ++i)
+ {
+ create_file(test_filename, test_image[i].data, test_image[i].size, path);
+ hr = D3DX10GetImageInfoFromFileW(path, NULL, &image_info, NULL);
+ delete_file(test_filename);
+
+ todo_wine
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ if (hr != S_OK)
+ continue;
+
+ check_image_info(&image_info, i, __LINE__);
+ }
+
CoUninitialize();
}
More information about the wine-cvs
mailing list