[PATCH 3/4] d2d1/tests: Add tests for GetPropertyCount().
Ziqing Hui
wine at gitlab.winehq.org
Thu Jun 30 03:23:41 CDT 2022
From: Ziqing Hui <zhui at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 b6eaac7d20b..96cba2a5e92 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -11234,6 +11234,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");
@@ -11318,10 +11321,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;
@@ -11400,6 +11403,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];
@@ -11470,11 +11476,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
@@ -11512,6 +11518,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];
@@ -11561,10 +11570,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};
@@ -11587,6 +11596,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
More information about the wine-devel
mailing list