From: Ziqing Hui Subject: [PATCH v3 1/5] d2d1/tests: Add more test xml. Message-Id: <20220614040856.1930461-1-zhui@codeweavers.com> Date: Tue, 14 Jun 2022 12:08:52 +0800 Signed-off-by: Ziqing Hui --- dlls/d2d1/tests/d2d1.c | 120 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 112 insertions(+), 8 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index bc662b4f8ae..970706bc569 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -99,6 +99,17 @@ L" \ \ "; +static const WCHAR *effect_xml_inputs_attribute = +L" \ + \ + \ + \ + \ + \ + \ + \ +"; + static const WCHAR *effect_xml_without_version = L" \ \ @@ -170,6 +181,90 @@ L" \ \ "; +static const WCHAR *effect_xml_wrong_type = +L" \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_duplicate_property = +L" \ + \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_lower_case_effect = +L" \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_lower_case_property = +L" \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_lower_case_inputs = +L" \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_min_max_inputs_a = +L" \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +"; + +static const WCHAR *effect_xml_min_max_inputs_b = +L" \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +"; + + static const DWORD test_vs[] = { #if 0 @@ -10604,10 +10699,11 @@ static void test_effect_register(BOOL d3d11) } xml_tests[] = { - {effect_xml_a, S_OK}, - {effect_xml_b, S_OK}, - {effect_xml_c, S_OK}, - {effect_xml_minimum, S_OK}, + {effect_xml_a, S_OK}, + {effect_xml_b, S_OK}, + {effect_xml_c, S_OK}, + {effect_xml_minimum, S_OK}, + {effect_xml_inputs_attribute, S_OK}, {effect_xml_without_version, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, {effect_xml_without_inputs, E_INVALIDARG}, {effect_xml_without_name, E_INVALIDARG}, @@ -10615,6 +10711,13 @@ static void test_effect_register(BOOL d3d11) {effect_xml_without_category, E_INVALIDARG}, {effect_xml_without_description, E_INVALIDARG}, {effect_xml_without_type, E_INVALIDARG}, + {effect_xml_wrong_type, E_INVALIDARG}, + {effect_xml_duplicate_property, E_INVALIDARG}, + {effect_xml_lower_case_effect, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, + {effect_xml_lower_case_property, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, + {effect_xml_lower_case_inputs, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, + {effect_xml_min_max_inputs_a, E_INVALIDARG}, + {effect_xml_min_max_inputs_b, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, }; const D2D1_PROPERTY_BINDING binding[] = @@ -10926,10 +11029,11 @@ static void test_effect_properties(BOOL d3d11) } system_property_tests[] = { - {effect_xml_a, L"TestEffectA", effect_author, effect_category, effect_description, 1, 1}, - {effect_xml_b, L"TestEffectB", effect_author, effect_category, effect_description, 1, 1}, - {effect_xml_c, L"TestEffectC", effect_author, effect_category, effect_description, 1, 1}, - {effect_xml_minimum, L"", L"" ,L"", L"", 0, 0}, + {effect_xml_a, L"TestEffectA", effect_author, effect_category, effect_description, 1, 1}, + {effect_xml_b, L"TestEffectB", effect_author, effect_category, effect_description, 1, 1}, + {effect_xml_c, L"TestEffectC", effect_author, effect_category, effect_description, 1, 1}, + {effect_xml_minimum, L"", L"" ,L"", L"", 0, 0}, + {effect_xml_inputs_attribute, L"", L"" ,L"", L"", 0, 0}, }; if (!init_test_context(&ctx, d3d11)) -- 2.25.1