[PATCH] tests: Don't evaluate the todo condition when not running on Wine.

Huw Davies huw at codeweavers.com
Fri Apr 21 08:01:44 CDT 2017

Signed-off-by: Huw Davies <huw at codeweavers.com>
This cropped up because I wanted to write a todo condition involving
IsProcessDPIAware(), since this doesn't exist in XP, its address is
loaded dynamically.  I could have written the condition as
pIsProcessDPIAware && pIsProcessDPIAware(), but since I know the
function is always present in Wine, that's unnecessary.  Perhaps
more to the point, I didn't expect the current behaviour.

 include/wine/test.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/wine/test.h b/include/wine/test.h
index af602c0fac..fa3f90c932 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -123,7 +123,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) WINETEST_PRI
                               winetest_loop_todo(); \
 #define todo_wine               todo_if(!strcmp(winetest_platform, "wine"))
-#define todo_wine_if(is_todo)   todo_if((is_todo) && !strcmp(winetest_platform, "wine"))
+#define todo_wine_if(is_todo)   todo_if(!strcmp(winetest_platform, "wine") && (is_todo))

More information about the wine-patches mailing list