From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/tests/d2d1.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index f801f605982..70561491227 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10316,7 +10316,7 @@ static void test_mt_factory(BOOL d3d11)
static void test_builtin_effect(BOOL d3d11) { - unsigned int i, j, min_inputs, max_inputs, str_size, input_count, value_size; + unsigned int i, j, min_inputs, max_inputs, str_size, input_count, value_size, property_count; D2D1_BITMAP_PROPERTIES bitmap_desc; D2D1_BUFFER_PRECISION precision; ID2D1Image *image_a, *image_b; @@ -10337,18 +10337,19 @@ static void test_builtin_effect(BOOL d3d11) { const CLSID *clsid; UINT32 factory_version; + UINT32 property_count; UINT32 default_input_count; UINT32 min_inputs; UINT32 max_inputs; } effect_tests[] = { - {&CLSID_D2D12DAffineTransform, 1, 1, 1, 1}, - {&CLSID_D2D13DPerspectiveTransform, 1, 1, 1, 1}, - {&CLSID_D2D1Composite, 1, 2, 1, 0xffffffff}, - {&CLSID_D2D1Crop, 1, 1, 1, 1}, - {&CLSID_D2D1Shadow, 1, 1, 1, 1}, - {&CLSID_D2D1Grayscale, 3, 1, 1, 1}, + {&CLSID_D2D12DAffineTransform, 1, 4, 1, 1, 1}, + {&CLSID_D2D13DPerspectiveTransform, 1, 8, 1, 1, 1}, + {&CLSID_D2D1Composite, 1, 1, 2, 1, 0xffffffff}, + {&CLSID_D2D1Crop, 1, 2, 1, 1, 1}, + {&CLSID_D2D1Shadow, 1, 3, 1, 1, 1}, + {&CLSID_D2D1Grayscale, 3, 0, 1, 1, 1}, };
const struct property_test @@ -10407,6 +10408,12 @@ static void test_builtin_effect(BOOL d3d11) ID2D1Image_Release(image_b); ID2D1Image_Release(image_a);
+ /* Test property count */ + property_count = ID2D1Effect_GetPropertyCount(effect); + todo_wine_if(test->property_count != 0) + ok(property_count == test->property_count, "Got unexpected property count %u, expected %u.\n", + property_count, test->property_count); + /* Test system property name, type, value size */ for (j = 0; j < ARRAY_SIZE(property_tests); ++j) { @@ -10997,7 +11004,7 @@ static void test_effect_context(BOOL d3d11)
static void test_effect_properties(BOOL d3d11) { - UINT32 i, min_inputs, max_inputs, integer, index; + UINT32 i, min_inputs, max_inputs, integer, index, property_count; ID2D1EffectContext *effect_context; D2D1_BUFFER_PRECISION precision; struct d2d1_test_context ctx; @@ -11159,6 +11166,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);
+ property_count = ID2D1Effect_GetPropertyCount(effect); + ok(property_count == 2, "Got unexpected property count %u.\n", property_count); + index = ID2D1Effect_GetPropertyIndex(effect, L"Context"); ok(index == 0, "Got unexpected index %u.\n", index); index = ID2D1Effect_GetPropertyIndex(effect, L"Integer");