From: Ziqing Hui Subject: [PATCH v2 3/4] d2d1/tests: Add tests for GetPropertyCount(). Message-Id: Date: Thu, 30 Jun 2022 09:52:20 +0000 In-Reply-To: References: From: Ziqing Hui Signed-off-by: Nikolay Sivov --- dlls/d2d1/tests/d2d1.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index ed3de26db5b..2c0dbc5406f 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -11230,6 +11230,9 @@ static void test_effect_properties(BOOL d3d11) hr = ID2D1DeviceContext_CreateEffect(ctx.context, &CLSID_TestEffect, &effect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + count = ID2D1Effect_GetPropertyCount(effect); + ok(count == 2, "Got unexpected property count %u.\n", count); + index = ID2D1Effect_GetPropertyIndex(effect, L"Context"); ok(index == 0, "Got unexpected index %u.\n", index); index = ID2D1Effect_GetPropertyIndex(effect, L"Integer"); @@ -11314,10 +11317,10 @@ static void test_effect_2d_affine(BOOL d3d11) { D2D1_MATRIX_3X2_F rotate, scale, skew; D2D1_BITMAP_PROPERTIES1 bitmap_desc; + unsigned int i, x, y, w, h, count; D2D_RECT_F output_bounds = {0}; struct d2d1_test_context ctx; ID2D1DeviceContext *context; - unsigned int i, x, y, w, h; D2D1_SIZE_U input_size; ID2D1Factory1 *factory; D2D1_POINT_2F offset; @@ -11396,6 +11399,9 @@ static void test_effect_2d_affine(BOOL d3d11) check_system_properties(effect, TRUE); + count = ID2D1Effect_GetPropertyCount(effect); + todo_wine ok(count == 4, "Got unexpected property count %u.\n", count); + for (i = 0; i < ARRAY_SIZE(effect_2d_affine_tests); ++i) { const struct effect_2d_affine_test *test = &effect_2d_affine_tests[i]; @@ -11466,11 +11472,11 @@ static void test_effect_crop(BOOL d3d11) D2D_RECT_F output_bounds; D2D1_SIZE_U input_size; ID2D1Factory1 *factory; + unsigned int count, i; ID2D1Bitmap1 *bitmap; DWORD image[16 * 16]; ID2D1Effect *effect; ID2D1Image *output; - unsigned int i; HRESULT hr; const struct crop_effect_test @@ -11508,6 +11514,9 @@ static void test_effect_crop(BOOL d3d11) check_system_properties(effect, TRUE); + count = ID2D1Effect_GetPropertyCount(effect); + todo_wine ok(count == 2, "Got unexpected property count %u.\n", count); + for (i = 0; i < ARRAY_SIZE(crop_effect_tests); ++i) { const struct crop_effect_test *test = &crop_effect_tests[i]; @@ -11557,10 +11566,10 @@ static void test_effect_grayscale(BOOL d3d11) ID2D1DeviceContext *context; D2D1_SIZE_U input_size; ID2D1Factory3 *factory; + unsigned int count, i; ID2D1Bitmap1 *bitmap; ID2D1Effect *effect; ID2D1Image *output; - unsigned int i; HRESULT hr; const DWORD test_pixels[] = {0xffffffff, 0x12345678, 0x89abcdef, 0x77777777, 0xdeadbeef}; @@ -11583,6 +11592,9 @@ static void test_effect_grayscale(BOOL d3d11) check_system_properties(effect, TRUE); + count = ID2D1Effect_GetPropertyCount(effect); + ok(!count, "Got unexpected property count %u.\n", count); + for (i = 0; i < ARRAY_SIZE(test_pixels); ++i) { DWORD pixel = test_pixels[i]; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/347