``` + void *proc; + int i; + HMODULE uxtheme = GetModuleHandleA("uxtheme.dll"); + static const struct + { + const char *name; + int ordinal; + } + func[] = + { + {"DrawThemeBackgroundEx", 47}, + {"IsThemeDialogTextureEnabled", 132}, + {"IsThemePartDefined", 133}, + {"SetThemeAppProperties", 135} + }; ```
Let's put the static const test data first.
And let's sort the declarations, like this. ``` + HMODULE uxtheme; + void *proc; + int i; + + uxtheme= GetModuleHandleA("uxtheme.dll"); ``` ``` + for (i = 0; i < ARRAY_SIZE(func); i++) + { + proc = GetProcAddress(uxtheme, MAKEINTRESOURCEA(func->ordinal)); + ok(proc == GetProcAddress(uxtheme, func->name), "Expected %s at ordinal %u\n", func->name, func->ordinal); + } ``` You're not using i at all so you're just testing the first function.
```ok(proc == GetProcAddress(uxtheme, func->name), "Expected %s at ordinal %u\n", func->name, func->ordinal);```
"Expected %s at ordinal %u\n" -> "Expected %s at ordinal %d.\n"
You can remove the ordinal tests for DrawThemeBackgroundEx() in test_DrawThemeBackgroundEx().
Thank you for working on this by the way.